diff options
Diffstat (limited to 'test/CodeGen/function-attributes.c')
-rw-r--r-- | test/CodeGen/function-attributes.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/test/CodeGen/function-attributes.c b/test/CodeGen/function-attributes.c index dacfdd9675..ca16459fd9 100644 --- a/test/CodeGen/function-attributes.c +++ b/test/CodeGen/function-attributes.c @@ -7,7 +7,7 @@ // RUN: grep 'define zeroext i16 @f5(i32 %x) nounwind' %t && // RUN: grep 'define void @f6(i16 signext %x) nounwind' %t && // RUN: grep 'define void @f7(i16 zeroext %x) nounwind' %t && -// RUN: grep 'define void @f8() nounwind alwaysinline' %t +// RUN: grep 'define void @f8() nounwind alwaysinline' %t && signed char f0(int x) { return x; } @@ -26,3 +26,14 @@ void f6(signed short x) { } void f7(unsigned short x) { } void __attribute__((always_inline)) f8(void) { } + +// RUN: grep 'call void @f9_t() noreturn' %t && +void __attribute__((noreturn)) f9_t(void); +void f9(void) { f9_t(); } + +// FIXME: We should be setting nounwind on calls. +// RUN: grep 'call i32 @f10_t() readnone' %t && +int __attribute__((const)) f10_t(void); +int f10(void) { return f10_t(); } + +// RUN: true |