summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/CodeGen')
-rw-r--r--llvm/test/CodeGen/X86/swift-error.ll18
1 files changed, 18 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/swift-error.ll b/llvm/test/CodeGen/X86/swift-error.ll
new file mode 100644
index 00000000000..5fb67d4f3b2
--- /dev/null
+++ b/llvm/test/CodeGen/X86/swift-error.ll
@@ -0,0 +1,18 @@
+; RUN: llc -mtriple x86_64-unknown-windows-msvc -filetype asm -o - %s | FileCheck %s
+
+%swift.error = type opaque
+
+declare swiftcc void @f(%swift.error** swifterror)
+
+define swiftcc void @g(i8*, i8*, i8*, i8*, %swift.error** swifterror %error) {
+entry:
+ call swiftcc void @f(%swift.error** nonnull nocapture swifterror %error)
+ ret void
+}
+
+; CHECK-LABEL: g
+; CHECK: pushq %r12
+; CHECK: callq f
+; CHECK: popq %r12
+; CHECK: retq
+
OpenPOWER on IntegriCloud