[LLVMdev] get value

Alexandru Ionut Diaconescu cyrusthevirus001x at yahoo.com
Tue Jun 25 03:05:31 PDT 2013


Hello !

This may be a trivial question, but I cannot get fields from a Value type.

If my Value is i32 1, how can I store 1 in a different structure (an integer) ? For the type, I have getType(). For the value, I see no method in Value.h. 


I tried to cast to ConstantExpr and then to get operands, or cast to ConstantDataArray and then use getAsString(), but is not working. How should I get the value?

Thank you !
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130625/a8f88bfb/attachment.html>


More information about the llvm-dev mailing list