diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-02-20 18:06:48 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-02-20 18:06:48 +0000 |
commit | c0ef9f59937c3971c48b6fed37cf5bd8985c024b (patch) | |
tree | 5cc83e25acc874fda399923131dd15ef30e2a0f8 /test/CodeGen/function-attributes.c | |
parent | 67956052ea5fb0cd7f443de96a11f9a0176dc681 (diff) |
Set call attribute for direct calls (i.e. noreturn).
- Remove an unused variant of EmitCallExpr overload.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65130 91177308-0d34-0410-b5e6-96231b3b80d8
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 |