[LLVMdev] Question about Constants

Eli Friedman eli.friedman at gmail.com
Wed Nov 7 15:31:08 PST 2012


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 0

ConstantArray::get has no side-effects.  You're probably looking for
getOperand().

-Eli



More information about the llvm-dev mailing list