xref: /aosp_15_r20/external/llvm/test/tools/llvm-split/unnamed.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llvm-split -o %t %s
2*9880d681SAndroid Build Coastguard Worker; RUN: llvm-dis -o - %t0 | FileCheck --check-prefix=CHECK0 %s
3*9880d681SAndroid Build Coastguard Worker; RUN: llvm-dis -o - %t1 | FileCheck --check-prefix=CHECK1 %s
4*9880d681SAndroid Build Coastguard Worker
5*9880d681SAndroid Build Coastguard Worker; CHECK0: declare hidden void @__llvmsplit_unnamed()
6*9880d681SAndroid Build Coastguard Worker; CHECK1: define hidden void @__llvmsplit_unnamed()
7*9880d681SAndroid Build Coastguard Workerdefine internal void @0() {
8*9880d681SAndroid Build Coastguard Worker  ; CHECK1: call void @foo()
9*9880d681SAndroid Build Coastguard Worker  call void @foo()
10*9880d681SAndroid Build Coastguard Worker  ret void
11*9880d681SAndroid Build Coastguard Worker}
12*9880d681SAndroid Build Coastguard Worker
13*9880d681SAndroid Build Coastguard Worker; CHECK0: declare hidden void @__llvmsplit_unnamed.1()
14*9880d681SAndroid Build Coastguard Worker; CHECK1: define hidden void @__llvmsplit_unnamed.1()
15*9880d681SAndroid Build Coastguard Workerdefine internal void @1() {
16*9880d681SAndroid Build Coastguard Worker  ; CHECK1: call void @foo()
17*9880d681SAndroid Build Coastguard Worker  ; CHECK1: call void @foo()
18*9880d681SAndroid Build Coastguard Worker  call void @foo()
19*9880d681SAndroid Build Coastguard Worker  call void @foo()
20*9880d681SAndroid Build Coastguard Worker  ret void
21*9880d681SAndroid Build Coastguard Worker}
22*9880d681SAndroid Build Coastguard Worker
23*9880d681SAndroid Build Coastguard Worker; CHECK0: define void @foo()
24*9880d681SAndroid Build Coastguard Worker; CHECK1: declare void @foo()
25*9880d681SAndroid Build Coastguard Workerdefine void @foo() {
26*9880d681SAndroid Build Coastguard Worker  ; CHECK0: call void @__llvmsplit_unnamed.1()
27*9880d681SAndroid Build Coastguard Worker  ; CHECK0: call void @__llvmsplit_unnamed()
28*9880d681SAndroid Build Coastguard Worker  call void @1()
29*9880d681SAndroid Build Coastguard Worker  call void @0()
30*9880d681SAndroid Build Coastguard Worker  ret void
31*9880d681SAndroid Build Coastguard Worker}
32