I have a Value* type named indexValue
, and the type is i32.
I think indexValue
must hold a number which type is int.
Now I want to use the exact number which pointed by indexValue ,
so I do like this:
ConstantInt* CI = llvm::cast<llvm::ConstantInt>(indexValue); //This is wrong, so is dyn_cast.
uint64_t index = indexValue->getZExtValue();
uint64_t size = index + 1;
I don't know if it is the right way. So, could anybody tell the way to get the integer content from a Value* which type is i32?
I'll be very very grateful if there is any answer.