• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // 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
3 // RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-windows-msvc-elf | FileCheck %s --check-prefix=ELF32
4 // 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-pc-windows-msvc-elf | FileCheck %s --check-prefix=ELF64
7 
8 // CHECK: target datalayout = "e-m:x-{{.*}}"
9 // X64: target datalayout = "e-m:w-{{.*}}"
10 // ELF32: target datalayout = "e-m:e-{{.*}}"
11 // ELF64: target datalayout = "e-m:e-{{.*}}"
12 
f1(void)13 void __stdcall f1(void) {}
14 // CHECK: define dso_local x86_stdcallcc void @"\01_f1@0"
15 // X64: define dso_local void @f1(
16 // ELF32: define x86_stdcallcc void @"\01_f1@0"
17 // ELF64: define void @f1(
18 
f2(void)19 void __fastcall f2(void) {}
20 // CHECK: define dso_local x86_fastcallcc void @"\01@f2@0"
21 // X64: define dso_local void @f2(
22 // ELF32: define x86_fastcallcc void @"\01@f2@0"
23 // ELF64: define void @f2(
24 
f3()25 void __stdcall f3() {}
26 // CHECK: define dso_local x86_stdcallcc void @"\01_f3@0"
27 // X64: define dso_local void @f3(
28 
f4(char a)29 void __fastcall f4(char a) {}
30 // CHECK: define dso_local x86_fastcallcc void @"\01@f4@4"
31 // X64: define dso_local void @f4(
32 
f5(short a)33 void __fastcall f5(short a) {}
34 // CHECK: define dso_local x86_fastcallcc void @"\01@f5@4"
35 // X64: define dso_local void @f5(
36 
f6(int a)37 void __fastcall f6(int a) {}
38 // CHECK: define dso_local x86_fastcallcc void @"\01@f6@4"
39 // X64: define dso_local void @f6(
40 
f7(long a)41 void __fastcall f7(long a) {}
42 // CHECK: define dso_local x86_fastcallcc void @"\01@f7@4"
43 // X64: define dso_local void @f7(
44 
f8(long long a)45 void __fastcall f8(long long a) {}
46 // CHECK: define dso_local x86_fastcallcc void @"\01@f8@8"
47 // X64: define dso_local void @f8(
48 
f9(long long a,char b,char c,short d)49 void __fastcall f9(long long a, char b, char c, short d) {}
50 // CHECK: define dso_local x86_fastcallcc void @"\01@f9@20"(i64 %a, i8 signext %b, i8 signext %c, i16 signext %d)
51 // X64: define dso_local void @f9(
52 
f12(void)53 void f12(void) {}
54 // CHECK: define dso_local void @f12(
55 // X64: define dso_local void @f12(
56 
v1(void)57 void __vectorcall v1(void) {}
58 // CHECK: define dso_local x86_vectorcallcc void @"\01v1@@0"(
59 // X64: define dso_local x86_vectorcallcc void @"\01v1@@0"(
60 // ELF32: define x86_vectorcallcc void @"\01v1@@0"(
61 // ELF64: define x86_vectorcallcc void @"\01v1@@0"(
62 
v2(char a)63 void __vectorcall v2(char a) {}
64 // CHECK: define dso_local x86_vectorcallcc void @"\01v2@@4"(
65 // X64: define dso_local x86_vectorcallcc void @"\01v2@@8"(
66 // ELF32: define x86_vectorcallcc void @"\01v2@@4"(
67 // ELF64: define x86_vectorcallcc void @"\01v2@@8"(
68 
v3(short a)69 void __vectorcall v3(short a) {}
70 // CHECK: define dso_local x86_vectorcallcc void @"\01v3@@4"(
71 // X64: define dso_local x86_vectorcallcc void @"\01v3@@8"(
72 
v4(int a)73 void __vectorcall v4(int a) {}
74 // CHECK: define dso_local x86_vectorcallcc void @"\01v4@@4"(
75 // X64: define dso_local x86_vectorcallcc void @"\01v4@@8"(
76 
v5(long long a)77 void __vectorcall v5(long long a) {}
78 // CHECK: define dso_local x86_vectorcallcc void @"\01v5@@8"(
79 // X64: define dso_local x86_vectorcallcc void @"\01v5@@8"(
80 
v6(char a,char b)81 void __vectorcall v6(char a, char b) {}
82 // CHECK: define dso_local x86_vectorcallcc void @"\01v6@@8"(
83 // X64: define dso_local x86_vectorcallcc void @"\01v6@@16"(
84