On 8 April 2017 at 05:18, Lorin Atzberger via llvm-dev
<llvm...@lists.llvm.org> wrote:
> return llvm::ConstantExpr::getGetElementPtr(nullptr,c,
> const_ptr_14_indices);
You need to be using the GlobalVariable as the base of the GEP, not
the ConstantDataArray. Then since it's been initialized to the string
you want, your GEP will pick up the first element of that string. The
ConstantDataArray isn't a pointer (it's an [N x i8], notionally in
registers).
Cheers.
Tim.
_______________________________________________
LLVM Developers mailing list
llvm...@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev