diff options
Diffstat (limited to 'test/CodeGen/preserve-call-conv.c')
-rw-r--r-- | test/CodeGen/preserve-call-conv.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/CodeGen/preserve-call-conv.c b/test/CodeGen/preserve-call-conv.c new file mode 100644 index 000000000000..6e91a8489b40 --- /dev/null +++ b/test/CodeGen/preserve-call-conv.c @@ -0,0 +1,17 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm < %s | FileCheck %s +// RUN: %clang_cc1 -triple arm64-unknown-unknown -emit-llvm < %s | FileCheck %s + +// Check that the preserve_most calling convention attribute at the source level +// is lowered to the corresponding calling convention attrribute at the LLVM IR +// level. +void foo() __attribute__((preserve_most)) { + // CHECK-LABEL: define preserve_mostcc void @foo() +} + +// Check that the preserve_most calling convention attribute at the source level +// is lowered to the corresponding calling convention attrribute at the LLVM IR +// level. +void boo() __attribute__((preserve_all)) { + // CHECK-LABEL: define preserve_allcc void @boo() +} + |