struct layout in AIX

Hi.

Is the alignment of a struct be computed in the constructor of StructLayout class? I wonder that the position of a member in the struct has been considered in llvm? Because the alignment of a member is dependent to the position in the struct in AIX platform according to the table in http://www.ibm.com/support/knowledgecenter/SSGH2K_13.1.2/com.ibm.xlc131.aix.doc/proguide/alignment.html (power alignment setting)

  1. In aggregates, the first member of this data type is aligned according to its natural alignment value; subsequent members of the aggregate are aligned on 4-byte boundaries.

Thanks

For C code, record layout decisions are made here:
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/RecordLayoutBuilder.cpp?view=markup

LLVM’s struct layout rules are only important if you aren’t using clang.

Because the alignment of a member is dependent to the position in the struct in AIX platform according to the table in http://www.ibm.com/support/knowledgecenter/SSGH2K_13.1.2/com.ibm.xlc131.aix.doc/proguide/alignment.html

And on the -qalign and #pragma options, which do get used. The commercial product I work on needs to be compiled -qalign=natural on AIX, or it doesn’t work (I can explain the reasons if anyone’s interested, but they’re complex, boring, and hard to work around).