xref: /aosp_15_r20/external/llvm/test/tools/llvm-split/internal.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: define hidden void @foo()
6*9880d681SAndroid Build Coastguard Worker; CHECK1: declare hidden void @foo()
7*9880d681SAndroid Build Coastguard Workerdefine internal void @foo() {
8*9880d681SAndroid Build Coastguard Worker  call void @bar()
9*9880d681SAndroid Build Coastguard Worker  ret void
10*9880d681SAndroid Build Coastguard Worker}
11*9880d681SAndroid Build Coastguard Worker
12*9880d681SAndroid Build Coastguard Worker; CHECK0: declare void @bar()
13*9880d681SAndroid Build Coastguard Worker; CHECK1: define void @bar()
14*9880d681SAndroid Build Coastguard Workerdefine void @bar() {
15*9880d681SAndroid Build Coastguard Worker  call void @foo()
16*9880d681SAndroid Build Coastguard Worker  ret void
17*9880d681SAndroid Build Coastguard Worker}
18