Displaying 3 results from an estimated 3 matches for "max_int_bits".
2017 Oct 20
2
How to create a 64 bit ConstInt having a value of -1?
I tried the following:
- ConstantInt::get(Type::getInt64Ty(Ctx), APInt(0xFFFFFFFFFFFFFFFF, 64,
false))
- ConstantInt::get(Type::getInt64Ty(Ctx), APInt(-1, 64))
I am receiving the following error: Assertion `NumBits <= MAX_INT_BITS &&
"bitwidth too large" failed
--
Thanks & Regards,
Dipanjan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171019/2e76a814/attachment.html>
2015 Jan 22
2
[LLVMdev] access IntegerType::getSignBit from Type *
...ntegerType, I need to know if it is signed or unsigned...
How to achieve this?
Thx
Alex
llvm::Type * getRandomValid_IntegerType(llvm::LLVMContext &C)
{
using namespace llvm;
//--- determine num of bits between allowed bits
int rI=randInt(IntegerType::MIN_INT_BITS,IntegerType::MAX_INT_BITS);
return IntegerType::get(C, rI);
}
llvm::Type * pType=getRandomValid_IntegerType(llvm::LLVMContext &C);
if(pType.isIntegerTy)
{
pType->getIntegerBitWidth(); // ok
pType->HOWTOGET_SIGN_INFO; //?
}
2007 Dec 15
2
[LLVMdev] fix warning with newer g++ compilers
...ype,
// return it.
if (IntEnd == 0) IntEnd = CurPtr;
if (IntEnd != StartChar) {
CurPtr = IntEnd;
uint64_t NumBits = atoull(StartChar, CurPtr);
- if (NumBits < IntegerType::MIN_INT_BITS ||
+ if (NumBits < IntegerType::MIN_INT_BITS ||
NumBits > IntegerType::MAX_INT_BITS) {
GenerateError("Bitwidth for integer type out of range!");
return YYERROR;
@@ -423,7 +425,7 @@ int LLLexer::LexIdentifier() {
llvmAsmlval.PrimType = Ty;
return INTTYPE;
}
-
+
// Otherwise, this was a letter sequence. See which keyword this is.
if (Key...