[LLVMdev] struct alignment question
edA-qa mort-ora-y
eda-qa at disemia.com
Mon Nov 18 20:42:45 PST 2013
Is a series of fields in a structure guaranteed to have the same layout
as those fields in a structure on their own? That is, can I cast a
pointer within a main structure to an equivalent type?
X = { a, b, c, d, e }
Y = { c, d, e }
y = BitCast( StructGEP( some_x, 2 ), Y* )
Is that a valid cast?
--
edA-qa mort-ora-y
Leaf Creator
Leaf - the language we always wanted
http://leaflang.org/
More information about the llvm-dev
mailing list