diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2011-10-12 19:51:18 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2011-10-12 19:51:18 +0000 |
| commit | 2d21ab024ed371ce2a45c8691d0676a4ed855cc1 (patch) | |
| tree | 41ec69341bd6b739149021a3287d76aa530ea02b /clang/test/CodeGen | |
| parent | a35d67dfd927191a16cf24931981d79901938381 (diff) | |
| download | bcm5719-llvm-2d21ab024ed371ce2a45c8691d0676a4ed855cc1.tar.gz bcm5719-llvm-2d21ab024ed371ce2a45c8691d0676a4ed855cc1.zip | |
Add returns_twice to functions that are known to return twice. This implements
the same behavior of gcc by keeping the attribute out of the function type.
llvm-svn: 141803
Diffstat (limited to 'clang/test/CodeGen')
| -rw-r--r-- | clang/test/CodeGen/function-attributes.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/CodeGen/function-attributes.c b/clang/test/CodeGen/function-attributes.c index fd98458c842..6cbf40ba220 100644 --- a/clang/test/CodeGen/function-attributes.c +++ b/clang/test/CodeGen/function-attributes.c @@ -100,3 +100,14 @@ __attribute__ ((returns_twice)) void f17(void); __attribute__ ((returns_twice)) void f18(void) { f17(); } + +// CHECK: define void @f19() +// CHECK: { +// CHECK: call i32 @setjmp(i32* null) +// CHECK: returns_twice +// CHECK: ret void +typedef int jmp_buf[((9 * 2) + 3 + 16)]; +int setjmp(jmp_buf); +void f19(void) { + setjmp(0); +} |

