diff options
| author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2014-04-16 08:06:33 +0000 |
|---|---|---|
| committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2014-04-16 08:06:33 +0000 |
| commit | a8931a4f8cb2c64cec38139b08c23e9020298fc4 (patch) | |
| tree | bafce7a6ae698a46f098df21743d6a1b68b71f07 /clang/test/CodeGen | |
| parent | 5a56cbf4965f0d7bcd9be4d1c15c559d398df96e (diff) | |
| download | bcm5719-llvm-a8931a4f8cb2c64cec38139b08c23e9020298fc4.tar.gz bcm5719-llvm-a8931a4f8cb2c64cec38139b08c23e9020298fc4.zip | |
Re-enable several builtins in non-gnu modes.
This is a partial revert of 183015.
By not recognizing things like _setjmp we lose (returns_twice) attribute on
them, which leads to incorrect code generation.
Fixes PR16138.
llvm-svn: 206362
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 47a05683557..177ad848f74 100644 --- a/clang/test/CodeGen/function-attributes.c +++ b/clang/test/CodeGen/function-attributes.c @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm -Os -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm -Os -std=c99 -o - %s | FileCheck %s // CHECK: define signext i8 @f0(i32 %x) [[NUW:#[0-9]+]] // CHECK: define zeroext i8 @f1(i32 %x) [[NUW]] // CHECK: define void @f2(i8 signext %x) [[NUW]] @@ -117,6 +118,16 @@ void f19(void) { setjmp(0); } +// CHECK-LABEL: define void @f20() +// CHECK: { +// CHECK: call i32 @_setjmp(i32* null) +// CHECK: [[RT_CALL]] +// CHECK: ret void +int _setjmp(jmp_buf); +void f20(void) { + _setjmp(0); +} + // CHECK: attributes [[NUW]] = { nounwind optsize readnone{{.*}} } // CHECK: attributes [[AI]] = { alwaysinline nounwind optsize readnone{{.*}} } // CHECK: attributes [[ALIGN]] = { nounwind optsize readnone alignstack=16{{.*}} } |

