>> It's hard to tell without more of the source code, but you probably needsomething like:>> getelementptr [6 x i8] * c"test\0A\00", i32 0, i32 0Isn'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. -- View this message in context: http://old.nabble.com/Pointer-to-String-Constant-tp27788693p27789107.html Sent from the LLVM - Dev mailing list archive at Nabble.com.
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
>> What does the .ll file look like that you're generating?I'm generating code on the fly using the IRBuilder class. -- View this message in context: http://old.nabble.com/Pointer-to-String-Constant-tp27788693p27789186.html Sent from the LLVM - Dev mailing list archive at Nabble.com.