diff options
| author | Douglas Gregor <dgregor@apple.com> | 2010-05-18 16:57:00 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2010-05-18 16:57:00 +0000 |
| commit | a941dcae166bd52e5ec4499e8a31a153dd1e1778 (patch) | |
| tree | db0cb22bc26e6255ce0fe87e95356cef1229acff /clang/test | |
| parent | be48c548c5593f1b6f9d02fec59c1a204e20c71e (diff) | |
| download | bcm5719-llvm-a941dcae166bd52e5ec4499e8a31a153dd1e1778.tar.gz bcm5719-llvm-a941dcae166bd52e5ec4499e8a31a153dd1e1778.zip | |
Add support for Microsoft's __thiscall, from Steven Watanabe!
llvm-svn: 104026
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/CodeGen/stdcall-fastcall.c | 37 |
1 files changed, 24 insertions, 13 deletions
diff --git a/clang/test/CodeGen/stdcall-fastcall.c b/clang/test/CodeGen/stdcall-fastcall.c index 46fe326fadf..6f3b0032877 100644 --- a/clang/test/CodeGen/stdcall-fastcall.c +++ b/clang/test/CodeGen/stdcall-fastcall.c @@ -2,38 +2,49 @@ void __attribute__((fastcall)) f1(void); void __attribute__((stdcall)) f2(void); -void __attribute__((fastcall)) f3(void) { -// CHECK: define x86_fastcallcc void @f3() +void __attribute__((thiscall)) f3(void); +void __attribute__((fastcall)) f4(void) { +// CHECK: define x86_fastcallcc void @f4() f1(); // CHECK: call x86_fastcallcc void @f1() } -void __attribute__((stdcall)) f4(void) { -// CHECK: define x86_stdcallcc void @f4() +void __attribute__((stdcall)) f5(void) { +// CHECK: define x86_stdcallcc void @f5() f2(); // CHECK: call x86_stdcallcc void @f2() } +void __attribute__((thiscall)) f6(void) { +// CHECK: define x86_thiscallcc void @f6() + f3(); +// CHECK: call x86_thiscallcc void @f3() +} // 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; +void (__attribute__((thiscall)) *pf3)(void) = f3; +void (__attribute__((fastcall)) *pf4)(void) = f4; +void (__attribute__((stdcall)) *pf5)(void) = f5; +void (__attribute__((thiscall)) *pf6)(void) = f6; int main(void) { - f3(); f4(); - // CHECK: call x86_fastcallcc void @f3() - // CHECK: call x86_stdcallcc void @f4() - pf1(); pf2(); pf3(); pf4(); + f4(); f5(); f6(); + // 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 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 %{{.*}}() return 0; } // PR7117 -void __attribute((stdcall)) f5(foo) int foo; {} -void f6(void) { - f5(0); +void __attribute((stdcall)) f7(foo) int foo; {} +void f8(void) { + f7(0); // CHECK: call x86_stdcallcc void (...)* bitcast } |

