[LLVMdev] How to get a constant of some type?

John Criswell criswell at illinois.edu
Thu May 13 21:32:20 PDT 2010


lucefe wrote:
> How to get a constant of some type?
>  
> For exmple, get a constant 10 of  Int32Ty.
>  
> Perhaps it's a stupid question. Thank you very much in advance.

Look at the documentation for the ConstantInt class.  It should have a 
method to do this.

-- John T.




More information about the llvm-dev mailing list