This is an archive of the discontinued LLVM Phabricator instance.

[RecordLayout] Only assert that fundamental type sizes are power of two on MSVC
ClosedPublic

Authored by mstorsjo on Feb 28 2018, 1:55 PM.

Details

Diff Detail

Repository
rL LLVM

Event Timeline

mstorsjo created this revision.Feb 28 2018, 1:55 PM
This revision is now accepted and ready to land.Feb 28 2018, 3:11 PM
compnerd accepted this revision.Feb 28 2018, 3:13 PM

Ugh, really not a fan of this change.

mstorsjo updated this revision to Diff 136471.Mar 1 2018, 12:09 AM
mstorsjo edited the summary of this revision. (Show Details)

Added an error-by-default diagnostic (just like the existing warn_cxx_ms_struct) for this case, trigger it on all targets other than mingw (where the situation is quite likely to occur, and GCC handles it silently).

@compnerd, do you like this better?

compnerd accepted this revision.Mar 1 2018, 11:24 AM

Awesome, thanks, this makes me feel much more comfortable.

This revision was automatically updated to reflect the committed changes.