[LLVMdev] Accessing constant indexes in GetElementPtr

Chris Lattner sabre at nondot.org
Mon Sep 23 10:40:00 PDT 2002

> be a constant of type UByte, and so it should cast to a ConstantUInt.
> (Operand 0 is not a special case, but it is always an array index so it
> sometimes may not be a constant.  Very often, though, it is the constant 0.)

One minor correction:  Operand #0 is the base pointer for the
getelementptr instruction, operand #1 (index #0) is what's being referred
to here...



More information about the llvm-dev mailing list