diff options
author | Tomohiro Kashiwada <kikairoya@gmail.com> | 2025-05-07 20:45:48 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-07 14:45:48 +0300 |
commit | 7157228667396f1c113a96e9e9ecb9f0ca82a645 (patch) | |
tree | 5e2012b7abb200737f9e2ff91a06fbe25c3a2c21 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | |
parent | c02aa91939d174a1efda934706d7b523b2fb7e31 (diff) | |
download | llvm-7157228667396f1c113a96e9e9ecb9f0ca82a645.zip llvm-7157228667396f1c113a96e9e9ecb9f0ca82a645.tar.gz llvm-7157228667396f1c113a96e9e9ecb9f0ca82a645.tar.bz2 |
[Cygwin] Emit COMDAT name correctly for Cygwin (#138621)
Cygwin-gcc emits COMDAT in the same format as MinGW-gcc.
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index c941529..e1bdc7e 100644 --- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp @@ -1830,7 +1830,7 @@ MCSection *TargetLoweringObjectFileCOFF::SelectSectionForGlobal( // 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 (getContext().getTargetTriple().isWindowsGNUEnvironment()) + if (getContext().getTargetTriple().isOSCygMing()) raw_svector_ostream(Name) << '$' << ComdatGV->getName(); return getContext().getCOFFSection(Name, Characteristics, COMDATSymName, |