summaryrefslogtreecommitdiff
path: root/test/CodeGen/attr-disable-tail-calls.c
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-06-21 14:00:56 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-06-21 14:00:56 +0000
commit2e645aa5697838f16ec570eb07c2bee7e13d0e0b (patch)
treea764184c2fc9486979b074250b013a0937ee64e5 /test/CodeGen/attr-disable-tail-calls.c
parent798321d8eb5630cd4a8f490a4f25e32ef195fb07 (diff)
Notes
Diffstat (limited to 'test/CodeGen/attr-disable-tail-calls.c')
-rw-r--r--test/CodeGen/attr-disable-tail-calls.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/CodeGen/attr-disable-tail-calls.c b/test/CodeGen/attr-disable-tail-calls.c
new file mode 100644
index 0000000000000..81413492ff3fe
--- /dev/null
+++ b/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" {{.*}} }