diff options
Diffstat (limited to 'contrib/llvm/lib/MC/MCAsmInfoCOFF.cpp')
-rw-r--r-- | contrib/llvm/lib/MC/MCAsmInfoCOFF.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/contrib/llvm/lib/MC/MCAsmInfoCOFF.cpp b/contrib/llvm/lib/MC/MCAsmInfoCOFF.cpp index 85104484fd40..d8fb875b67c6 100644 --- a/contrib/llvm/lib/MC/MCAsmInfoCOFF.cpp +++ b/contrib/llvm/lib/MC/MCAsmInfoCOFF.cpp @@ -41,6 +41,15 @@ MCAsmInfoCOFF::MCAsmInfoCOFF() { // At least MSVC inline-asm does AShr. UseLogicalShr = false; + + // 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() {} @@ -49,4 +58,12 @@ MCAsmInfoMicrosoft::MCAsmInfoMicrosoft() = default; void MCAsmInfoGNUCOFF::anchor() {} -MCAsmInfoGNUCOFF::MCAsmInfoGNUCOFF() = default; +MCAsmInfoGNUCOFF::MCAsmInfoGNUCOFF() { + // If this is a GNU environment (mingw or cygwin), don't use associative + // 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; +} |