
Adds AArch64 support for the `preserve_none` calling convention. Registers X0-X7, X9-X15 and X19-X28 are caller save, and can be used to pass arguments. Delegates to AAPCS for all other registers. Closes #87423
17 lines
550 B
LLVM
17 lines
550 B
LLVM
; RUN: not llc -mtriple=aarch64 %s -o - 2>&1 | FileCheck %s
|
|
|
|
; Swift attributes should not be used with preserve_none.
|
|
|
|
declare preserve_nonecc void @foo(ptr swiftself)
|
|
|
|
; CHECK: error: <unknown>:0:0: in function bar void (ptr): Swift attributes can't be used with preserve_none
|
|
define preserve_nonecc void @bar(ptr swifterror) {
|
|
ret void
|
|
}
|
|
|
|
; CHECK: error: <unknown>:0:0: in function qux void (ptr): Swift attributes can't be used with preserve_none
|
|
define void @qux(ptr %addr) {
|
|
call preserve_nonecc void @foo(ptr swiftself %addr)
|
|
ret void
|
|
}
|