xref: /aosp_15_r20/external/llvm/test/tools/gold/X86/available-externally.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llvm-as %s -o %t.o
2*9880d681SAndroid Build Coastguard Worker; RUN: llvm-as %p/Inputs/available-externally.ll -o %t2.o
3*9880d681SAndroid Build Coastguard Worker
4*9880d681SAndroid Build Coastguard Worker; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
5*9880d681SAndroid Build Coastguard Worker; RUN:    --plugin-opt=emit-llvm \
6*9880d681SAndroid Build Coastguard Worker; RUN:    -shared %t.o %t2.o -o %t3.o
7*9880d681SAndroid Build Coastguard Worker; RUN: llvm-dis %t3.o -o - | FileCheck %s
8*9880d681SAndroid Build Coastguard Worker
9*9880d681SAndroid Build Coastguard Worker; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
10*9880d681SAndroid Build Coastguard Worker; RUN:    --plugin-opt=emit-llvm \
11*9880d681SAndroid Build Coastguard Worker; RUN:    -shared %t2.o %t.o -o %t3.o
12*9880d681SAndroid Build Coastguard Worker; RUN: llvm-dis %t3.o -o - | FileCheck %s
13*9880d681SAndroid Build Coastguard Worker
14*9880d681SAndroid Build Coastguard Workerdefine void @foo() {
15*9880d681SAndroid Build Coastguard Worker  call void @bar()
16*9880d681SAndroid Build Coastguard Worker  call void @zed()
17*9880d681SAndroid Build Coastguard Worker  ret void
18*9880d681SAndroid Build Coastguard Worker}
19*9880d681SAndroid Build Coastguard Workerdefine available_externally void @bar() {
20*9880d681SAndroid Build Coastguard Worker  ret void
21*9880d681SAndroid Build Coastguard Worker}
22*9880d681SAndroid Build Coastguard Workerdefine available_externally void @zed() {
23*9880d681SAndroid Build Coastguard Worker  ret void
24*9880d681SAndroid Build Coastguard Worker}
25*9880d681SAndroid Build Coastguard Worker
26*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: define available_externally void @bar() {
27*9880d681SAndroid Build Coastguard Worker; CHECK-DAG: define void @zed() {
28