[LLVMdev] string to value

Bill Wendling wendling at apple.com
Tue May 17 18:05:12 PDT 2011


On May 17, 2011, at 5:48 PM, George Baah wrote:

> Hi All,
>   Is there a way to convert a const char * to a Value type?
> 
Could you be more specific? Are you looking to make a string literal a Value? If so, then you need to create a Constant of the string first (a constant array of i8), then create a GlobalVariable with that type, and then initialize that GlobalVariable with the Constant.

-bw





More information about the llvm-dev mailing list