diff options
Diffstat (limited to 'test/CodeGen/attr-disable-tail-calls.c')
-rw-r--r-- | test/CodeGen/attr-disable-tail-calls.c | 11 |
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 0000000..8141349 --- /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" {{.*}} } |