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