[PATCH] D43734: [RecordLayout] Don't align to non-power-of-2 sizes when using -mms-bitfields

Martin Storsjö via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 28 13:31:51 PST 2018


mstorsjo added inline comments.


================
Comment at: cfe/trunk/lib/AST/RecordLayoutBuilder.cpp:1758
+             Context.getTargetInfo().getTriple().isWindowsGNUEnvironment()) &&
+            "Non PowerOf2 size outside of GNU mode");
+        if (TypeSize > FieldAlign &&
----------------
efriedma wrote:
> This assertion seems weird.  `sizeof(long double)` is 12 for other targets, including x86-32 Linux.
Perhaps it'd make more sense to flip it around, `assert(isPowerOf2() || !Triple.isWindowsMSVCEnvironment())`?


Repository:
  rL LLVM

https://reviews.llvm.org/D43734





More information about the cfe-commits mailing list