[LLVMdev] Pointer to String Constant

Bill Wendling wendling at apple.com
Thu Mar 4 18:02:44 PST 2010


On Mar 4, 2010, at 5:56 PM, Nyx wrote:

> 
>>> It's hard to tell without more of the source code, but you probably need
> something like:
>>> getelementptr [6 x i8] * c"test\0A\00", i32 0, i32 0
> 
> Isn't that pretty much what I have? I'm doing a constant gep on the string
> constant, which registers as an array of type [6 x i8], with two i32 0
> indices. Note that I tried with a non-constant gep also, and it does the
> same thing.
> 
What does the .ll file look like that you're generating?

-bw





More information about the llvm-dev mailing list