diff options
author | Charles Davis <cdavis@mines.edu> | 2010-02-05 18:13:10 +0000 |
---|---|---|
committer | Charles Davis <cdavis@mines.edu> | 2010-02-05 18:13:10 +0000 |
commit | 16c4f3c7d44289e30f5066dce7ce9efe7ff67bbc (patch) | |
tree | 2781cbdead8abdd85a9e224443ef52fdc0c35da2 /test/CodeGen/stdcall-fastcall.c | |
parent | 8ca3eb0eca8230c2419fea229e3973a233c63a4b (diff) |
Now that we store calling conventions in the types, use them instead of
getting the calling convention from the target function, which may or may not
exist. Fixes PR5280.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95399 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/stdcall-fastcall.c')
-rw-r--r-- | test/CodeGen/stdcall-fastcall.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/test/CodeGen/stdcall-fastcall.c b/test/CodeGen/stdcall-fastcall.c index 838ccfb48c..1fbed300d8 100644 --- a/test/CodeGen/stdcall-fastcall.c +++ b/test/CodeGen/stdcall-fastcall.c @@ -1,5 +1,5 @@ -// 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 | grep 'fastcallcc' | count 6 +// RUN: %clang_cc1 -emit-llvm < %s | grep 'stdcallcc' | count 6 void __attribute__((fastcall)) f1(void); void __attribute__((stdcall)) f2(void); @@ -10,8 +10,15 @@ void __attribute__((stdcall)) f4(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(); + pf1(); pf2(); pf3(); pf4(); return 0; } |