2014-01-15 03:35:09 +08:00
|
|
|
// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-win32 | FileCheck %s
|
2013-10-16 09:40:34 +08:00
|
|
|
// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-mingw32 | FileCheck %s
|
2015-04-02 00:45:06 +08:00
|
|
|
// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-windows-msvc-elf | FileCheck %s --check-prefix=ELF32
|
2014-11-01 06:00:51 +08:00
|
|
|
// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-pc-win32 | FileCheck %s --check-prefix=X64
|
|
|
|
// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-mingw32 | FileCheck %s --check-prefix=X64
|
2015-04-02 00:45:06 +08:00
|
|
|
// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-pc-windows-msvc-elf | FileCheck %s --check-prefix=ELF64
|
|
|
|
|
|
|
|
// CHECK: target datalayout = "e-m:x-{{.*}}"
|
|
|
|
// X64: target datalayout = "e-m:w-{{.*}}"
|
|
|
|
// ELF32: target datalayout = "e-m:e-{{.*}}"
|
|
|
|
// ELF64: target datalayout = "e-m:e-{{.*}}"
|
2013-10-16 09:40:34 +08:00
|
|
|
|
|
|
|
void __stdcall f1(void) {}
|
2018-02-24 03:30:48 +08:00
|
|
|
// CHECK: define dso_local x86_stdcallcc void @"\01_f1@0"
|
|
|
|
// X64: define dso_local void @f1(
|
2015-04-02 00:45:06 +08:00
|
|
|
// ELF32: define x86_stdcallcc void @"\01_f1@0"
|
|
|
|
// ELF64: define void @f1(
|
2013-10-16 09:40:34 +08:00
|
|
|
|
|
|
|
void __fastcall f2(void) {}
|
2018-02-24 03:30:48 +08:00
|
|
|
// CHECK: define dso_local x86_fastcallcc void @"\01@f2@0"
|
|
|
|
// X64: define dso_local void @f2(
|
2015-04-02 00:45:06 +08:00
|
|
|
// ELF32: define x86_fastcallcc void @"\01@f2@0"
|
|
|
|
// ELF64: define void @f2(
|
2013-10-16 09:40:34 +08:00
|
|
|
|
|
|
|
void __stdcall f3() {}
|
2018-02-24 03:30:48 +08:00
|
|
|
// CHECK: define dso_local x86_stdcallcc void @"\01_f3@0"
|
|
|
|
// X64: define dso_local void @f3(
|
2013-10-16 09:40:34 +08:00
|
|
|
|
|
|
|
void __fastcall f4(char a) {}
|
2018-02-24 03:30:48 +08:00
|
|
|
// CHECK: define dso_local x86_fastcallcc void @"\01@f4@4"
|
|
|
|
// X64: define dso_local void @f4(
|
2013-10-16 09:40:34 +08:00
|
|
|
|
|
|
|
void __fastcall f5(short a) {}
|
2018-02-24 03:30:48 +08:00
|
|
|
// CHECK: define dso_local x86_fastcallcc void @"\01@f5@4"
|
|
|
|
// X64: define dso_local void @f5(
|
2013-10-16 09:40:34 +08:00
|
|
|
|
|
|
|
void __fastcall f6(int a) {}
|
2018-02-24 03:30:48 +08:00
|
|
|
// CHECK: define dso_local x86_fastcallcc void @"\01@f6@4"
|
|
|
|
// X64: define dso_local void @f6(
|
2013-10-16 09:40:34 +08:00
|
|
|
|
|
|
|
void __fastcall f7(long a) {}
|
2018-02-24 03:30:48 +08:00
|
|
|
// CHECK: define dso_local x86_fastcallcc void @"\01@f7@4"
|
|
|
|
// X64: define dso_local void @f7(
|
2013-10-16 09:40:34 +08:00
|
|
|
|
|
|
|
void __fastcall f8(long long a) {}
|
2018-02-24 03:30:48 +08:00
|
|
|
// CHECK: define dso_local x86_fastcallcc void @"\01@f8@8"
|
|
|
|
// X64: define dso_local void @f8(
|
2013-10-16 09:40:34 +08:00
|
|
|
|
|
|
|
void __fastcall f9(long long a, char b, char c, short d) {}
|
2018-02-24 03:30:48 +08:00
|
|
|
// CHECK: define dso_local x86_fastcallcc void @"\01@f9@20"(i64 %a, i8 signext %b, i8 signext %c, i16 signext %d)
|
|
|
|
// X64: define dso_local void @f9(
|
2013-10-16 09:40:34 +08:00
|
|
|
|
|
|
|
void f12(void) {}
|
2018-02-24 03:30:48 +08:00
|
|
|
// CHECK: define dso_local void @f12(
|
|
|
|
// X64: define dso_local void @f12(
|
2014-11-01 06:00:51 +08:00
|
|
|
|
|
|
|
void __vectorcall v1(void) {}
|
2018-02-24 03:30:48 +08:00
|
|
|
// CHECK: define dso_local x86_vectorcallcc void @"\01v1@@0"(
|
|
|
|
// X64: define dso_local x86_vectorcallcc void @"\01v1@@0"(
|
2015-04-02 00:45:06 +08:00
|
|
|
// ELF32: define x86_vectorcallcc void @"\01v1@@0"(
|
|
|
|
// ELF64: define x86_vectorcallcc void @"\01v1@@0"(
|
2014-11-01 06:00:51 +08:00
|
|
|
|
|
|
|
void __vectorcall v2(char a) {}
|
2018-02-24 03:30:48 +08:00
|
|
|
// CHECK: define dso_local x86_vectorcallcc void @"\01v2@@4"(
|
|
|
|
// X64: define dso_local x86_vectorcallcc void @"\01v2@@8"(
|
2015-04-02 00:45:06 +08:00
|
|
|
// ELF32: define x86_vectorcallcc void @"\01v2@@4"(
|
|
|
|
// ELF64: define x86_vectorcallcc void @"\01v2@@8"(
|
2014-11-01 06:00:51 +08:00
|
|
|
|
|
|
|
void __vectorcall v3(short a) {}
|
2018-02-24 03:30:48 +08:00
|
|
|
// CHECK: define dso_local x86_vectorcallcc void @"\01v3@@4"(
|
|
|
|
// X64: define dso_local x86_vectorcallcc void @"\01v3@@8"(
|
2014-11-01 06:00:51 +08:00
|
|
|
|
|
|
|
void __vectorcall v4(int a) {}
|
2018-02-24 03:30:48 +08:00
|
|
|
// CHECK: define dso_local x86_vectorcallcc void @"\01v4@@4"(
|
|
|
|
// X64: define dso_local x86_vectorcallcc void @"\01v4@@8"(
|
2014-11-01 06:00:51 +08:00
|
|
|
|
|
|
|
void __vectorcall v5(long long a) {}
|
2018-02-24 03:30:48 +08:00
|
|
|
// CHECK: define dso_local x86_vectorcallcc void @"\01v5@@8"(
|
|
|
|
// X64: define dso_local x86_vectorcallcc void @"\01v5@@8"(
|
2014-11-01 06:00:51 +08:00
|
|
|
|
|
|
|
void __vectorcall v6(char a, char b) {}
|
2018-02-24 03:30:48 +08:00
|
|
|
// CHECK: define dso_local x86_vectorcallcc void @"\01v6@@8"(
|
|
|
|
// X64: define dso_local x86_vectorcallcc void @"\01v6@@16"(
|