[PATCH] D79719: [AIX] Implement AIX special alignment rule about double/long double

Hubert Tong via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 8 22:04:33 PDT 2020


hubert.reinterpretcast added inline comments.


================
Comment at: clang/lib/AST/RecordLayoutBuilder.cpp:1208
+    // "first (inherited) member".
+    HandledFirstNonOverlappingEmptyField = true;
+
----------------
We need some sort of `IsFirstNonEmptyBase` to record that the current base qualifies for the alignment upgrade:
```
struct A { double x; };
struct B : A {} b;
```


================
Comment at: clang/lib/AST/RecordLayoutBuilder.cpp:1245
+  // space or zero-extent array.
+  if (DefaultsToAIXPowerAlignment && HandledFirstNonOverlappingEmptyField) {
+    UnpackedPreferredBaseAlign = UnpackedBaseAlign;
----------------
Query `!IsFirstNonEmptyBase` instead of `HandledFirstNonOverlappingEmptyField` here.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79719/new/

https://reviews.llvm.org/D79719





More information about the cfe-commits mailing list