[LLVMdev] question about GetElementPtr Instruction

Brian R. Gaeke gaeke at uiuc.edu
Thu Sep 26 01:57:01 PDT 2002


Dear LLVMdev,

As far as I can tell, what the "ubyte 2" value really means is the
2+1'th member of the structure...regardless of whether that structure's
3rd element actually starts at (pointer to structure) + 3*sizeof(ubyte)
or not.  So, is there any semantic connection between "ubyte" as
used in structure accesses and what getelementptr actually interprets
it as?  Or is it just called ubyte for fun?

-"Confused in Urbana", Brian 

> I have a question about GetElementPtr. 
> 
> Suppose I have an GetElementPtr Instruction GI:
> 
> %reg = getelementptr %ST* %s, uint 1, ubyte 2, ubyte 1, uint
> 5, uint 13

-- 
gaeke at uiuc.edu



More information about the llvm-dev mailing list