summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCAsmInfoCOFF.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/MC/MCAsmInfoCOFF.cpp')
-rw-r--r--llvm/lib/MC/MCAsmInfoCOFF.cpp8
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;
}
OpenPOWER on IntegriCloud