[PATCH] D79719: [AIX] Implement AIX special alignment rule about double/long double
Jason Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 23 19:27:06 PDT 2020
jasonliu added inline comments.
================
Comment at: clang/lib/AST/RecordLayoutBuilder.cpp:1881
+ if (isAIXLayout(Context) && FieldOffset == CharUnits::Zero() &&
+ (IsUnion || NonOverlappingEmptyFieldFound)) {
+ FirstNonOverlappingEmptyFieldHandled = true;
----------------
Xiangling_L wrote:
> jasonliu wrote:
> > Maybe it's a naive thought, but is it possible to replace `NonOverlappingEmptyFieldFound` with `IsOverlappingEmptyField && FieldOffsets.size() == 0`?
> I don't think these two work the same. `NonOverlappingEmptyFieldFound` represents the 1st non-empty and non-overlapping field in the record. `IsOverlappingEmptyField && FieldOffsets.size() == 0` represents something opposite.
You are right. I meant could we replace it with `!(IsOverlappingEmptyField && FieldOffsets.size() == 0)`?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79719/new/
https://reviews.llvm.org/D79719
More information about the cfe-commits
mailing list