xref: /aosp_15_r20/external/llvm/test/tools/gold/X86/comdat2.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llvm-as %s -o %t.bc
2*9880d681SAndroid Build Coastguard Worker; RUN: llvm-as %p/Inputs/comdat2.ll -o %t2.bc
3*9880d681SAndroid Build Coastguard Worker; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
4*9880d681SAndroid Build Coastguard Worker; RUN:    --plugin-opt=emit-llvm \
5*9880d681SAndroid Build Coastguard Worker; RUN:    -shared %t.bc %t2.bc -o %t3.bc
6*9880d681SAndroid Build Coastguard Worker; RUN: llvm-dis %t3.bc -o - | FileCheck %s
7*9880d681SAndroid Build Coastguard Worker
8*9880d681SAndroid Build Coastguard Worker
9*9880d681SAndroid Build Coastguard Worker$foo = comdat any
10*9880d681SAndroid Build Coastguard Worker@foo = global i8 0, comdat
11*9880d681SAndroid Build Coastguard Worker
12*9880d681SAndroid Build Coastguard Worker; CHECK: @foo = global i8 0, comdat
13*9880d681SAndroid Build Coastguard Worker
14*9880d681SAndroid Build Coastguard Worker; CHECK: define void @zed() {
15*9880d681SAndroid Build Coastguard Worker; CHECK:   call void @bar()
16*9880d681SAndroid Build Coastguard Worker; CHECK:   ret void
17*9880d681SAndroid Build Coastguard Worker; CHECK: }
18*9880d681SAndroid Build Coastguard Worker
19*9880d681SAndroid Build Coastguard Worker; CHECK: declare void @bar()
20