aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/Transforms/ThinLTOBitcodeWriter/cfi-check.ll
blob: b927af6b92f7cc0b29df046d70b1a868688c2888 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
; RUN: opt -thinlto-bc -thinlto-split-lto-unit -o %t %s
; RUN: llvm-modextract -b -n 0 -o - %t | llvm-dis | FileCheck --check-prefix=M0 %s
; RUN: llvm-modextract -b -n 1 -o - %t | llvm-dis | FileCheck --check-prefix=M1 %s

; Check that __cfi_check is emitted on the full LTO side with
; attributes preserved.

; M0: define void @f()
define void @f() !type !{!"f1", i32 0} {
  ret void 
}

; M1: define void @__cfi_check() #0
define void @__cfi_check() #0 {
  ret void
}

; M1: attributes #0 = { "branch-target-enforcement" }
attributes #0 = { "branch-target-enforcement" }