1; RUN: opt -module-summary %s -o %t.o
2; RUN: opt -module-summary %p/Inputs/thinlto_internalize.ll -o %t2.o
3
4; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold.so \
5; RUN:     --plugin-opt=thinlto \
6; RUN:     --plugin-opt=-import-instr-limit=0 \
7; RUN:     --plugin-opt=save-temps \
8; RUN:     -o %t3.o %t2.o %t.o
9; RUN: llvm-dis %t.o.opt.bc -o - | FileCheck %s
10
11; f() should be internalized and eliminated after inlining
12; CHECK-NOT: @f()
13
14target triple = "x86_64-unknown-linux-gnu"
15define i32 @g() {
16  call void @f()
17  ret i32 0
18}
19define void @f() {
20  ret void
21}
22