summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/function-attributes.c
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-02-20 18:06:48 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-02-20 18:06:48 +0000
commitcdbb5e336d0f6072cc09ec744e1bcf0254c317ab (patch)
tree8e5f8ec613150fc7434df5174cd10e8ceb47b526 /clang/test/CodeGen/function-attributes.c
parent9ee23b7f1a4dec2d7c36a5a2f9f5cb1f6581a5d2 (diff)
downloadbcm5719-llvm-cdbb5e336d0f6072cc09ec744e1bcf0254c317ab.tar.gz
bcm5719-llvm-cdbb5e336d0f6072cc09ec744e1bcf0254c317ab.zip
Set call attribute for direct calls (i.e. noreturn).
- Remove an unused variant of EmitCallExpr overload. llvm-svn: 65130
Diffstat (limited to 'clang/test/CodeGen/function-attributes.c')
-rw-r--r--clang/test/CodeGen/function-attributes.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/clang/test/CodeGen/function-attributes.c b/clang/test/CodeGen/function-attributes.c
index dacfdd96750..ca16459fd97 100644
--- a/clang/test/CodeGen/function-attributes.c
+++ b/clang/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
OpenPOWER on IntegriCloud