aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
diff options
context:
space:
mode:
authorTomohiro Kashiwada <kikairoya@gmail.com>2025-05-07 20:45:48 +0900
committerGitHub <noreply@github.com>2025-05-07 14:45:48 +0300
commit7157228667396f1c113a96e9e9ecb9f0ca82a645 (patch)
tree5e2012b7abb200737f9e2ff91a06fbe25c3a2c21 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
parentc02aa91939d174a1efda934706d7b523b2fb7e31 (diff)
downloadllvm-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.cpp2
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,