Commit Graph

2 Commits

Author SHA1 Message Date
Erich Keane 892e633194 Fix r350643 to limit COFF emission to <= 32 BYTES instead of BITS.
The patch in r350643 incorrectly sets the COFF emission based on bits
instead of bytes. This patch converts the 32 via CharUnits to bits to
compare the correct values.

Change-Id: Icf38a16470ad5ae3531374969c033557ddb0d323
llvm-svn: 353411
2019-02-07 15:14:11 +00:00
Erich Keane 85c6224971 Limit COFF 'common' emission to <=32 alignment types.
As reported in PR33035, LLVM crashes if given a common object with an
alignment of greater than 32 bits. This is because the COFF file format
does not support these alignments, so emitting them is broken anyway.

This patch changes any global definitions greater than 32 bit alignment
to no longer be in 'common'.

https://bugs.llvm.org/show_bug.cgi?id=33035

Differential Revision: https://reviews.llvm.org/D56391

Change-Id: I48609289753b7f3b58c5e2bc1712756750fbd45a
llvm-svn: 350643
2019-01-08 18:44:22 +00:00