Hi all,
I’m new to the Clang frontend and most probably miss something. But I’m stuck at the following problem.
I have own DataLayout, where alignment for all types is 256 bits. However, ItaniumRecordLayoutBuilder makes layout(ASTRecordLayout) for structures without taking this into account.
Thus, I got the following assertion failure:
32 != 256
Assertion failed: (TypeSizeInBits == getDataLayout().getTypeAllocSizeInBits(Ty) && "Type size mismatch!"), function ComputeRecordLayout, file /Users/shermike/proj/nilc/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp, line 939
For example, for struct {int n;}
, TypeSizeInBits
is equal to 32 bits, but should be 256, I guess.
What I’m doing wrong? Maybe I need to implement my own Layout Builder?