summaryrefslogtreecommitdiff
path: root/clang/test/CodeGen/arm-swiftcall.c
diff options
context:
space:
mode:
authorTim Northover <t.p.northover@gmail.com>2020-12-17 13:29:40 +0000
committerTim Northover <t.p.northover@gmail.com>2020-12-18 18:58:22 +0000
commit36e0c08ed8ac0ab51608baaaad625266e603c11f (patch)
tree1c7df10fc7559db0d35a2a76bcf930d0b0a0a057 /clang/test/CodeGen/arm-swiftcall.c
parentbdc0a1d6fda17a527fad86d5af7e49b4c0a9ad60 (diff)
downloadllvm-cherry-pick-something.tar.gz
Swift support: add __attribute__((swift_async_context)) to args.cherry-pick-something
This translates to "swiftasync" LLVM attribute.
Diffstat (limited to 'clang/test/CodeGen/arm-swiftcall.c')
-rw-r--r--clang/test/CodeGen/arm-swiftcall.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/test/CodeGen/arm-swiftcall.c b/clang/test/CodeGen/arm-swiftcall.c
index 45f313d8250f..fc8012130ac1 100644
--- a/clang/test/CodeGen/arm-swiftcall.c
+++ b/clang/test/CodeGen/arm-swiftcall.c
@@ -6,6 +6,7 @@
#define OUT __attribute__((swift_indirect_result))
#define ERROR __attribute__((swift_error_result))
#define CONTEXT __attribute__((swift_context))
+#define ASYNC_CONTEXT __attribute__((swift_async_context))
/*****************************************************************************/
/****************************** PARAMETER ABIS *******************************/
@@ -53,6 +54,9 @@ void test_context_error_1() {
SWIFTCALL void context_error_2(short s, CONTEXT int *self, ERROR float **error) {}
// CHECK-LABEL: define {{.*}} void @context_error_2(i16{{.*}}, i32* swiftself{{.*}}, float** swifterror %0)
+SWIFTCALL void async_context_1(ASYNC_CONTEXT void *self) {}
+// CHECK-LABEL: define {{.*}} void @async_context_1(i8* swiftasync
+
/*****************************************************************************/
/********************************** LOWERING *********************************/
/*****************************************************************************/