diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-01-30 05:45:05 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-01-30 05:45:05 +0000 |
commit | debc59d1f360b1f7a041de72c02d76ed131370c6 (patch) | |
tree | 6693132ec1fd52975e19332db23028b63f75fa4b /clang/test/CodeGen/function-attributes.c | |
parent | 457a77739b7c297f40d0e712e8c5ff6cda2aac0f (diff) | |
download | bcm5719-llvm-debc59d1f360b1f7a041de72c02d76ed131370c6.tar.gz bcm5719-llvm-debc59d1f360b1f7a041de72c02d76ed131370c6.zip |
Semantic analysis and CodeGen support for C11's _Noreturn. This is modeled as
an attribute for consistency with our other noreturn mechanisms.
llvm-svn: 173898
Diffstat (limited to 'clang/test/CodeGen/function-attributes.c')
-rw-r--r-- | clang/test/CodeGen/function-attributes.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/clang/test/CodeGen/function-attributes.c b/clang/test/CodeGen/function-attributes.c index 6cbf40ba220..886bd8d2fb5 100644 --- a/clang/test/CodeGen/function-attributes.c +++ b/clang/test/CodeGen/function-attributes.c @@ -32,10 +32,16 @@ void __attribute__((always_inline)) f8(void) { } // CHECK: call void @f9_t() // CHECK: noreturn -// CHECK: { +// CHECK: } void __attribute__((noreturn)) f9_t(void); void f9(void) { f9_t(); } +// CHECK: call void @f9a() +// CHECK: noreturn +// CHECK: } +_Noreturn void f9a(void); +void f9b(void) { f9a(); } + // FIXME: We should be setting nounwind on calls. // CHECK: call i32 @f10_t() // CHECK: readnone |