summaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/msabi-swiftcall-cc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGenCXX/msabi-swiftcall-cc.cpp')
-rw-r--r--test/CodeGenCXX/msabi-swiftcall-cc.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/CodeGenCXX/msabi-swiftcall-cc.cpp b/test/CodeGenCXX/msabi-swiftcall-cc.cpp
new file mode 100644
index 0000000000..5a5453af8f
--- /dev/null
+++ b/test/CodeGenCXX/msabi-swiftcall-cc.cpp
@@ -0,0 +1,28 @@
+// RUN: %clang_cc1 -triple i686-unknown-windows-msvc -fdeclspec -emit-llvm %s -o - | FileCheck %s
+
+void __attribute__((__swiftcall__)) f() {}
+// CHECK-DAG: @"\01?f@@YSXXZ"
+
+void (__attribute__((__swiftcall__)) *p)();
+// CHECK-DAG: @"\01?p@@3P6SXXZA"
+
+namespace {
+void __attribute__((__swiftcall__)) __attribute__((__used__)) f() { }
+// CHECK-DAG: "\01?f@?A@@YSXXZ"
+}
+
+namespace n {
+void __attribute__((__swiftcall__)) f() {}
+// CHECK-DAG: "\01?f@n@@YSXXZ"
+}
+
+struct __declspec(dllexport) S {
+ S(const S &) = delete;
+ S & operator=(const S &) = delete;
+ void __attribute__((__swiftcall__)) m() { }
+ // CHECK-DAG: "\01?m@S@@QASXXZ"
+};
+
+void f(void (__attribute__((__swiftcall__))())) {}
+// CHECK-DAG: "\01?f@@YAXP6SXXZ@Z"
+