diff options
Diffstat (limited to 'contrib/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
| -rw-r--r-- | contrib/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 5 | 
1 files changed, 3 insertions, 2 deletions
| diff --git a/contrib/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/contrib/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index f6b91a2f0231..16140f0b12be 100644 --- a/contrib/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/contrib/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp @@ -1156,10 +1156,11 @@ MCSection *TargetLoweringObjectFileCOFF::SelectSectionForGlobal(        MCSymbol *Sym = TM.getSymbol(ComdatGV);        StringRef COMDATSymName = Sym->getName(); -      // Append "$symbol" to the section name when targetting mingw. The ld.bfd +      // Append "$symbol" to the section name *before* IR-level mangling is +      // applied when targetting mingw. This is what GCC does, and the ld.bfd        // COFF linker will not properly handle comdats otherwise.        if (getTargetTriple().isWindowsGNUEnvironment()) -        raw_svector_ostream(Name) << '$' << COMDATSymName; +        raw_svector_ostream(Name) << '$' << ComdatGV->getName();        return getContext().getCOFFSection(Name, Characteristics, Kind,                                           COMDATSymName, Selection, UniqueID); | 
