summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/stdcall-fastcall.c
diff options
context:
space:
mode:
authorrdivacky <rdivacky@FreeBSD.org>2010-02-16 09:31:36 +0000
committerrdivacky <rdivacky@FreeBSD.org>2010-02-16 09:31:36 +0000
commitfd035e6496665b1f1197868e21cb0a4594e8db6e (patch)
tree53010172e19c77ea447bcd89e117cda052ab52e0 /test/CodeGen/stdcall-fastcall.c
parent2fce988e86bc01829142e4362d4eff1af0925147 (diff)
downloadFreeBSD-src-fd035e6496665b1f1197868e21cb0a4594e8db6e.zip
FreeBSD-src-fd035e6496665b1f1197868e21cb0a4594e8db6e.tar.gz
Update clang to r96341.
Diffstat (limited to 'test/CodeGen/stdcall-fastcall.c')
-rw-r--r--test/CodeGen/stdcall-fastcall.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/test/CodeGen/stdcall-fastcall.c b/test/CodeGen/stdcall-fastcall.c
index 838ccfb..bea6df3 100644
--- a/test/CodeGen/stdcall-fastcall.c
+++ b/test/CodeGen/stdcall-fastcall.c
@@ -1,17 +1,33 @@
-// RUN: %clang_cc1 -emit-llvm < %s | grep 'fastcallcc' | count 4
-// RUN: %clang_cc1 -emit-llvm < %s | grep 'stdcallcc' | count 4
+// RUN: %clang_cc1 -emit-llvm < %s | FileCheck %s
void __attribute__((fastcall)) f1(void);
void __attribute__((stdcall)) f2(void);
void __attribute__((fastcall)) f3(void) {
+// CHECK: define x86_fastcallcc void @f3()
f1();
+// CHECK: call x86_fastcallcc void @f1()
}
void __attribute__((stdcall)) f4(void) {
+// CHECK: define x86_stdcallcc void @f4()
f2();
+// CHECK: call x86_stdcallcc void @f2()
}
+// PR5280
+void (__attribute__((fastcall)) *pf1)(void) = f1;
+void (__attribute__((stdcall)) *pf2)(void) = f2;
+void (__attribute__((fastcall)) *pf3)(void) = f3;
+void (__attribute__((stdcall)) *pf4)(void) = f4;
+
int main(void) {
f3(); f4();
+ // CHECK: call x86_fastcallcc void @f3()
+ // CHECK: call x86_stdcallcc void @f4()
+ pf1(); pf2(); pf3(); pf4();
+ // CHECK: call x86_fastcallcc void %{{.*}}()
+ // CHECK: call x86_stdcallcc void %{{.*}}()
+ // CHECK: call x86_fastcallcc void %{{.*}}()
+ // CHECK: call x86_stdcallcc void %{{.*}}()
return 0;
}
OpenPOWER on IntegriCloud