[llvm-dev] How to create a 64 bit ConstInt having a value of -1?

Dipanjan Das via llvm-dev llvm-dev at lists.llvm.org
Thu Oct 19 17:26:22 PDT 2017


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>


More information about the llvm-dev mailing list