Implement AIX default power alignment rule by adding PreferredAlignment and PreferredNVAlignment in ASTRecordLayout class.
The implementation aims at returning correct value for __alignof(x) and alignof(x) under power alignment rules.
The AIX power alignment rules apply the natural alignment of the
"first member" if it is of a floating-point data type (or is an aggregate
whose recursively "first" member or element is such a type). The alignment
associated with these types for subsequent members use an alignment value
where the floating-point data type is considered to have 4-byte alignment.
For the purposes of the foregoing: vtable pointers, non-empty base classes,
and zero-width bit-fields count as prior members; members of empty class
types marked no_unique_address are not considered to be prior members.
- ASTRecordLayout Layout.Alignment records the min alignment/ABI align of object, which is also the value _Alignof(x) should return;
2.Layout.NonVirtualAlignment records min alignment of nv part of object
- The size/nvsize of object will be rounded up to PreferredAlignment/PreferredNVAlignment on AIX.
4.getPreferredTypeAlign = __alignof(x) = preferred alignment of object