1 // RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-win32 | \
2 // RUN: FileCheck --check-prefix=WIN %s
4 // RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-mingw32 | \
5 // RUN: FileCheck --check-prefix=ITANIUM %s
7 void __stdcall
f1(void) {}
8 // WIN: define dso_local x86_stdcallcc void @"?f1@@YGXXZ"
9 // ITANIUM: define dso_local x86_stdcallcc void @"\01__Z2f1v@0"
11 void __fastcall
f2(void) {}
12 // WIN: define dso_local x86_fastcallcc void @"?f2@@YIXXZ"
13 // ITANIUM: define dso_local x86_fastcallcc void @"\01@_Z2f2v@0"
15 extern "C" void __stdcall
f3(void) {}
16 // WIN: define dso_local x86_stdcallcc void @"\01_f3@0"
17 // ITANIUM: define dso_local x86_stdcallcc void @"\01_f3@0"
19 extern "C" void __fastcall
f4(void) {}
20 // WIN: define dso_local x86_fastcallcc void @"\01@f4@0"
21 // ITANIUM: define dso_local x86_fastcallcc void @"\01@f4@0"
23 void __pascal
f5(void) {}
24 // WIN: define dso_local void @"?f5@@YCXXZ"
25 // ITANIUM: define dso_local void @_Z2f5v
29 static void __stdcall
bar();
33 // WIN: define dso_local x86_stdcallcc void @"?foo@Foo@@QAGXXZ"
34 // ITANIUM: define dso_local x86_stdcallcc void @"\01__ZN3Foo3fooEv@4"
37 // WIN: define dso_local x86_stdcallcc void @"?bar@Foo@@SGXXZ"
38 // ITANIUM: define dso_local x86_stdcallcc void @"\01__ZN3Foo3barEv@0"
40 // Mostly a test that we don't crash and that the names start with a \01.
41 // gcc on mingw produces __Zpp@4
43 extern "C" void __stdcall
operator++(Foo
&x
) {
45 // WIN: define dso_local x86_stdcallcc void @"??E@YGXAAUFoo@@@Z"
46 // ITANIUM: define dso_local x86_stdcallcc void @"\01__ZppR3Foo@4"