1; RUN: opt -module-summary %s -o %t1.bc 2; RUN: llvm-lto -thinlto-action=thinlink -o %t.index.bc %t1.bc 3; RUN: llvm-lto -thinlto-action=internalize -thinlto-index %t.index.bc %t1.bc -o - | llvm-dis -o - | FileCheck %s --check-prefix=REGULAR 4; RUN: llvm-lto -thinlto-action=internalize -thinlto-index %t.index.bc %t1.bc -o - --exported-symbol=foo | llvm-dis -o - | FileCheck %s --check-prefix=INTERNALIZE 5 6; RUN: llvm-lto2 run %t1.bc -o %t.o -save-temps \ 7; RUN: -r=%t1.bc,_foo,pxl \ 8; RUN: -r=%t1.bc,_bar,pl \ 9; RUN: -r=%t1.bc,_linkonce_func,pl 10; RUN: llvm-dis < %t.o.1.2.internalize.bc | FileCheck %s --check-prefix=INTERNALIZE2 11 12 13; REGULAR: define void @foo 14; REGULAR: define void @bar 15; REGULAR: define linkonce void @linkonce_func() 16; INTERNALIZE: define void @foo 17; INTERNALIZE: define internal void @bar 18; INTERNALIZE: define internal void @linkonce_func() 19; INTERNALIZE2: define dso_local void @foo 20; INTERNALIZE2: define internal void @bar 21; INTERNALIZE2: define internal void @linkonce_func() 22 23target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" 24target triple = "x86_64-apple-macosx10.11.0" 25 26define void @foo() { 27 call void @bar() 28 ret void 29} 30define void @bar() { 31 call void @linkonce_func() 32 ret void 33} 34define linkonce void @linkonce_func() { 35 ret void 36} 37