[PATCH] D43734: [RecordLayout] Don't align to non-power-of-2 sizes when using -mms-bitfields
Eli Friedman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 28 13:39:30 PST 2018
efriedma 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 &&
----------------
mstorsjo wrote:
> 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())`?
Yes, that makes sense.
Repository:
rL LLVM
https://reviews.llvm.org/D43734
More information about the cfe-commits
mailing list