Skip to content

Commit f7b4da8

Browse files
author
git apple-llvm automerger
committed
Merge commit 'f4907049285c' from llvm.org/release/21.x into stable/21.x
2 parents 8118e17 + f490704 commit f7b4da8

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

clang/lib/Basic/Targets/X86.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,7 @@ class LLVM_LIBRARY_VISIBILITY CygwinX86_32TargetInfo : public X86_32TargetInfo {
648648
: X86_32TargetInfo(Triple, Opts) {
649649
this->WCharType = TargetInfo::UnsignedShort;
650650
this->WIntType = TargetInfo::UnsignedInt;
651+
this->UseMicrosoftManglingForC = true;
651652
DoubleAlign = LongLongAlign = 64;
652653
resetDataLayout("e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-"
653654
"i128:128-f80:32-n8:16:32-a:0:32-S32",
@@ -985,6 +986,7 @@ class LLVM_LIBRARY_VISIBILITY CygwinX86_64TargetInfo : public X86_64TargetInfo {
985986
: X86_64TargetInfo(Triple, Opts) {
986987
this->WCharType = TargetInfo::UnsignedShort;
987988
this->WIntType = TargetInfo::UnsignedInt;
989+
this->UseMicrosoftManglingForC = true;
988990
}
989991

990992
void getTargetDefines(const LangOptions &Opts,

clang/test/CodeGen/mangle-windows.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-win32 | FileCheck %s
2-
// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-mingw32 | FileCheck %s
2+
// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-mingw32 | FileCheck %s
3+
// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-cygwin | FileCheck %s
34
// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-windows-msvc-elf | FileCheck %s --check-prefix=ELF32
45
// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-pc-win32 | FileCheck %s --check-prefix=X64
5-
// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-mingw32 | FileCheck %s --check-prefix=X64
6+
// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-mingw32 | FileCheck %s --check-prefix=X64
7+
// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-cygwin | FileCheck %s --check-prefix=X64
68
// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-pc-windows-msvc-elf | FileCheck %s --check-prefix=ELF64
79

810
// CHECK: target datalayout = "e-m:x-{{.*}}"

clang/test/CodeGenCXX/mangle-windows.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-mingw32 | \
55
// RUN: FileCheck --check-prefix=ITANIUM %s
66

7+
// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-cygwin | \
8+
// RUN: FileCheck --check-prefix=ITANIUM %s
9+
710
void __stdcall f1(void) {}
811
// WIN: define dso_local x86_stdcallcc void @"?f1@@YGXXZ"
912
// ITANIUM: define dso_local x86_stdcallcc void @"\01__Z2f1v@0"

0 commit comments

Comments
 (0)