[LLVMdev] How to get the array size of GetElementPtrInst->getPointerOperand() ?

Welson Sun welson.sun at gmail.com
Mon Feb 13 19:46:41 PST 2012


OK, figured out. The value is an Instruction, the AllocaInst.
On Feb 13, 2012 5:08 PM, "Welson Sun" <welson.sun at gmail.com> wrote:

> If I dump the Value of GetElementPtrInst->getPointerOperand(), I got this:
>
> %a = alloca [10 x i32], align 16
>
>
> Obviously, there should be a way to get the dimension and element type via
> the "Value" returned from GetElementPtrInst->getPointerOperand(), but how?
>
> What kind of "Value" is this?
>
>
> Thanks!
> Welson
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120213/1257e950/attachment.html>


More information about the llvm-dev mailing list