summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/attr-disable-tail-calls.c
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@apple.com>2015-06-09 19:04:36 +0000
committerAkira Hatanaka <ahatanaka@apple.com>2015-06-09 19:04:36 +0000
commit262a4c4ec02fdd62eeb2e1def510074068c33509 (patch)
treecf5b0aec10c1b95ae69684606bcaeda682c6be9a /clang/test/CodeGen/attr-disable-tail-calls.c
parent7fef2f5206afb9283a3c1dc76bebb3845847c3d5 (diff)
downloadbcm5719-llvm-262a4c4ec02fdd62eeb2e1def510074068c33509.tar.gz
bcm5719-llvm-262a4c4ec02fdd62eeb2e1def510074068c33509.zip
Attach attribute "disable-tail-calls" to the functions in the IR.
This commit adds back the code that seems to have been dropped unintentionally in r176985. rdar://problem/13752163 Differential Revision: http://reviews.llvm.org/D10100 llvm-svn: 239426
Diffstat (limited to 'clang/test/CodeGen/attr-disable-tail-calls.c')
-rw-r--r--clang/test/CodeGen/attr-disable-tail-calls.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/CodeGen/attr-disable-tail-calls.c b/clang/test/CodeGen/attr-disable-tail-calls.c
new file mode 100644
index 00000000000..81413492ff3
--- /dev/null
+++ b/clang/test/CodeGen/attr-disable-tail-calls.c
@@ -0,0 +1,11 @@
+// RUN: %clang_cc1 -triple x86_64-apple-macosx10.7.0 %s -emit-llvm -mdisable-tail-calls -o - | FileCheck %s -check-prefix=CHECK -check-prefix=DISABLE
+// RUN: %clang_cc1 -triple x86_64-apple-macosx10.7.0 %s -emit-llvm -o - | FileCheck %s -check-prefix=CHECK -check-prefix=ENABLE
+
+// CHECK: define i32 @f1() [[ATTR:#[0-9]+]] {
+
+int f1() {
+ return 0;
+}
+
+// DISABLE: attributes [[ATTR]] = { {{.*}} "disable-tail-calls"="true" {{.*}} }
+// ENABLE: attributes [[ATTR]] = { {{.*}} "disable-tail-calls"="false" {{.*}} }
OpenPOWER on IntegriCloud