diff options
| author | Martin Storsjo <martin@martin.st> | 2018-07-23 22:15:25 +0000 |
|---|---|---|
| committer | Martin Storsjo <martin@martin.st> | 2018-07-23 22:15:25 +0000 |
| commit | db42d51ee36c479511df56310bb5c2e079df7702 (patch) | |
| tree | eb13df70dcb3e3e3c40273ce9a4699f30a3c066e /llvm/lib/MC | |
| parent | 100fc97051c19ef3675fc105dd428955b7f5f285 (diff) | |
| download | bcm5719-llvm-db42d51ee36c479511df56310bb5c2e079df7702.tar.gz bcm5719-llvm-db42d51ee36c479511df56310bb5c2e079df7702.zip | |
[MC] Add a separate flag for skipping comdat constant sections for MinGW. NFC.
This actually has nothing to do with the associative comdat sections
that aren't supported by GNU binutils ld.
Clarify the comments from SVN r335918 and use a separate flag for it.
Differential Revision: https://reviews.llvm.org/D49645
llvm-svn: 337757
Diffstat (limited to 'llvm/lib/MC')
| -rw-r--r-- | llvm/lib/MC/MCAsmInfoCOFF.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCAsmInfoCOFF.cpp b/llvm/lib/MC/MCAsmInfoCOFF.cpp index 8bb02c3f649..d8fb875b67c 100644 --- a/llvm/lib/MC/MCAsmInfoCOFF.cpp +++ b/llvm/lib/MC/MCAsmInfoCOFF.cpp @@ -45,6 +45,11 @@ MCAsmInfoCOFF::MCAsmInfoCOFF() { // If this is a COFF target, assume that it supports associative comdats. It's // part of the spec. HasCOFFAssociativeComdats = true; + + // We can generate constants in comdat sections that can be shared, + // but in order not to create null typed symbols, we actually need to + // make them global symbols as well. + HasCOFFComdatConstants = true; } void MCAsmInfoMicrosoft::anchor() {} @@ -58,4 +63,7 @@ MCAsmInfoGNUCOFF::MCAsmInfoGNUCOFF() { // comdats for jump tables, unwind information, and other data associated with // a function. HasCOFFAssociativeComdats = false; + + // We don't create constants in comdat sections for MinGW. + HasCOFFComdatConstants = false; } |

