aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/CodeGen/X86/preserve_none_swift.ll
blob: 9a1c15190c6a2fc94760ceef8c0830b0a25b82c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
; RUN: not llc -mtriple=x86_64 %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
}