[LLVMdev] Reading Static Values

bdavis at cs.fsu.edu bdavis at cs.fsu.edu
Sat Sep 24 12:21:43 PDT 2011


Hi,

I'm currently trying to translate LLVM IR language to VPO .dec file  
specification. I'm using LLVM source parser in the same way that it is  
used in tools llc or llvm-as. One issue I'm having is I cannot find  
any static values. For example, in a global declaration i.e. '@a =  
global i32 7, align 4' I cannot get '7' from the parsed structure.

Similarly (sort of), once I'm looking at a parsed Function, and I go  
into a BasicBlock, and get say and add Instruction, and I get its  
operands, I can't get static values. If for example the Instruction  
was '%add = add i32 %tmp, 60', I can get the name of value 'tmp' which  
is enough, but I can't get the value '60'.

Thank you for any help.

-Brandon D

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.





More information about the llvm-dev mailing list