[LLVMdev] Operand, instruction
krishnadhan at cse.iitb.ac.in
Thu Apr 22 11:39:09 PDT 2010
Thanks again for your reply.
You are right. But i am looking to change the value of that constant value
and use that as operand in other instruction. For example there is one
constant operand with value 6, i will multiply it with 2, and then use 12 as
operand in other instruction. So i need to convert 12 to value class and
then i will be able to set it as operand.
Hope i am clear now.
John Criswell-2 wrote:
> help__me_please wrote:
>> Thanks for the quick reply.
>> I am able to get the numerical value. But i also need the numerical value
>> be in value type, so that it can be used as operand of other instruction.
>> For that i am trying to create a new ConstantInt, but i am unable to find
>> create() function for ConstantInt.
> There is no need to do that. If you look at the inheritance hierarchy
> in doxygen, ConstantInt inherits (indirectly) from Value. You can use a
> ConstantInt in any place where a Value can be used.
> -- John T.
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
View this message in context: http://old.nabble.com/Operand%2C-instruction-tp21961718p28333005.html
Sent from the LLVM - Dev mailing list archive at Nabble.com.
More information about the llvm-dev