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/CodeGen/TargetLoweringObjectFileImpl.cpp | |
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/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index b726b21f6b9..b5dd2d4cca8 100644 --- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp @@ -1397,9 +1397,11 @@ MCSection *TargetLoweringObjectFileCOFF::getSectionForConstant( const DataLayout &DL, SectionKind Kind, const Constant *C, unsigned &Align) const { if (Kind.isMergeableConst() && C && - getContext().getAsmInfo()->hasCOFFAssociativeComdats()) { - // GNU binutils doesn't support the kind of symbol with a null - // storage class that this generates. + getContext().getAsmInfo()->hasCOFFComdatConstants()) { + // This creates comdat sections with the given symbol name, but unless + // AsmPrinter::GetCPISymbol actually makes the symbol global, the symbol + // will be created with a null storage class, which makes GNU binutils + // error out. const unsigned Characteristics = COFF::IMAGE_SCN_CNT_INITIALIZED_DATA | COFF::IMAGE_SCN_MEM_READ | COFF::IMAGE_SCN_LNK_COMDAT; |