I have a const array of structs (struct is made up of two int). This code:
ArrayRef<Constant*> AR;
CA->get(AT, AR);
where CA = ConstantArray* and AT* = ArrayType gives AR.size() of 0
I just want to iterate through the ConstantArray and find the values of the
integers inside the structs.
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20121107/e7f18f73/attachment.html>
On Wed, Nov 7, 2012 at 3:16 PM, Ryan Taylor <ryta1203 at gmail.com> wrote:> I have a const array of structs (struct is made up of two int). This code: > > ArrayRef<Constant*> AR; > CA->get(AT, AR); > > where CA = ConstantArray* and AT* = ArrayType gives AR.size() of 0ConstantArray::get has no side-effects. You're probably looking for getOperand(). -Eli