[LLVMdev] GetElementPtrConstantExpr question

Eduardo erocha.ssa at gmail.com
Sat Dec 29 05:20:44 PST 2012

Hi all,

I just come across an IR instruction like this:

  %0 = getelementptr i32* getelementptr inbounds ([42 x i32]* @aaa,
i32 0, i32 0), i32 %2

What does the part "i32* getelementptr inbounds ([42 x i32]* @aaa, i32
0, i32 0)" mean? As far as I could understand this is a
GetElementPtrConstantExpr, isn't it?

My question is: how can I instantiate a class that represents that
instruction part so that I can perform some changes in it? I tried the
class GetElementPtrConstantExpr but it seems to be a private class to
Constants.cpp (I saw a comment in lib/VMCore/ConstantsContext.h about

Thanks in advance,

More information about the llvm-dev mailing list