mirror of
https://github.com/RPCS3/llvm.git
synced 2026-01-31 01:25:19 +01:00
Add support for passing SwiftError through a register on the Windows x64 calling convention. This allows the use of swifterror attributes on parameters which is used by the swift front end for the `Error` parameter. This partially enables building the swift standard library for Windows x86_64. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313791 91177308-0d34-0410-b5e6-96231b3b80d8
19 lines
436 B
LLVM
19 lines
436 B
LLVM
; 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
|
|
|