diff options
author | Reid Kleckner <reid@kleckner.net> | 2014-10-24 17:42:17 +0000 |
---|---|---|
committer | Reid Kleckner <reid@kleckner.net> | 2014-10-24 17:42:17 +0000 |
commit | d7857f05f4c56cf7bd22ce5a6a8d78df6043ab6d (patch) | |
tree | c423a984ad030a579ab4d6be0a136c21903c1c04 /clang/test/CodeGen | |
parent | d024f528b474bd0446ced3eb0fe660e71bfa87eb (diff) | |
download | bcm5719-llvm-d7857f05f4c56cf7bd22ce5a6a8d78df6043ab6d.tar.gz bcm5719-llvm-d7857f05f4c56cf7bd22ce5a6a8d78df6043ab6d.zip |
Add frontend support for __vectorcall
Wire it through everywhere we have support for fastcall, essentially.
This allows us to parse the MSVC "14" CTP headers, but we will
miscompile them because LLVM doesn't support __vectorcall yet.
Reviewed By: Aaron Ballman
Differential Revision: http://reviews.llvm.org/D5808
llvm-svn: 220573
Diffstat (limited to 'clang/test/CodeGen')
-rw-r--r-- | clang/test/CodeGen/microsoft-call-conv.c | 13 | ||||
-rw-r--r-- | clang/test/CodeGen/mrtd.c | 2 |
2 files changed, 12 insertions, 3 deletions
diff --git a/clang/test/CodeGen/microsoft-call-conv.c b/clang/test/CodeGen/microsoft-call-conv.c index b80c58dfd1f..aabe825516a 100644 --- a/clang/test/CodeGen/microsoft-call-conv.c +++ b/clang/test/CodeGen/microsoft-call-conv.c @@ -20,6 +20,12 @@ void __thiscall f6(void) { f3(); // CHECK: call x86_thiscallcc void @f3() } +// FIXME: Add this to LLVM. +void __vectorcall f61(void) { +// CHECK-LABEL: define void @f61() + f3(); +// CHECK: call x86_thiscallcc void @f3() +} // PR5280 void (__fastcall *pf1)(void) = f1; @@ -28,19 +34,22 @@ void (__thiscall *pf3)(void) = f3; void (__fastcall *pf4)(void) = f4; void (__stdcall *pf5)(void) = f5; void (__thiscall *pf6)(void) = f6; +void (__vectorcall *pf7)(void) = f61; int main(void) { - f4(); f5(); f6(); + f4(); f5(); f6(); f61(); // CHECK: call x86_fastcallcc void @f4() // CHECK: call x86_stdcallcc void @f5() // CHECK: call x86_thiscallcc void @f6() - pf1(); pf2(); pf3(); pf4(); pf5(); pf6(); + // CHECK: call void @f61() + pf1(); pf2(); pf3(); pf4(); pf5(); pf6(); pf7(); // CHECK: call x86_fastcallcc void %{{.*}}() // CHECK: call x86_stdcallcc void %{{.*}}() // CHECK: call x86_thiscallcc void %{{.*}}() // CHECK: call x86_fastcallcc void %{{.*}}() // CHECK: call x86_stdcallcc void %{{.*}}() // CHECK: call x86_thiscallcc void %{{.*}}() + // CHECK: call void %{{.*}}() return 0; } diff --git a/clang/test/CodeGen/mrtd.c b/clang/test/CodeGen/mrtd.c index 1132d046095..f929d4c26b2 100644 --- a/clang/test/CodeGen/mrtd.c +++ b/clang/test/CodeGen/mrtd.c @@ -1,6 +1,6 @@ // RUN: %clang_cc1 -mrtd -triple i386-unknown-unknown -std=c89 -emit-llvm -o - %s 2>&1 | FileCheck %s -// CHECK: mrtd.c:10:3: warning: function with no prototype cannot use the callee-cleanup stdcall calling convention +// CHECK: mrtd.c:10:3: warning: function with no prototype cannot use the stdcall calling convention void baz(int arg); |