1 ; RUN: opt <%s -unified-lto -thinlto-split-lto-unit -thinlto-bc -o %t.bc
3 ; Test internalization during unified LTO. This makes sure internalization does
4 ; happen in runRegularLTO().
5 ; RUN: llvm-lto2 run %t.bc -o %t.o -save-temps --unified-lto=full \
6 ; RUN: -r=%t.bc,salad,pxl \
7 ; RUN: -r=%t.bc,balsamic,pl \
8 ; RUN: -r=%t.bc,thousandisland,pl \
9 ; RUN: -r=%t.bc,main,pxl \
10 ; RUN: -r %t.bc,ranch,px \
11 ; RUN: -r %t.bc,egg, \
12 ; RUN: -r %t.bc,bar,px
13 ; RUN: llvm-dis < %t.o.0.2.internalize.bc | FileCheck %s
15 ; CHECK: @llvm.used = appending global {{.*}} @bar
16 ; CHECK: define dso_local dllexport void @thousandisland
17 ; CHECK: define dso_local void @salad
18 ; CHECK: define internal void @balsamic
19 ; CHECK: define dso_local void @main
20 ; CHECK: define available_externally void @egg()
22 target triple = "x86_64-scei-ps4"
23 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
25 define void @salad() {
29 define void @balsamic() {
32 define dllexport void @thousandisland() {
40 define void ()* @ranch() {
44 define available_externally void @egg() {
48 %"foo.1" = type { i8, i8 }
49 declare dso_local i32 @bar(%"foo.1"* nocapture readnone %this) local_unnamed_addr
50 @llvm.used = appending global [2 x i8*] [i8* bitcast (i32 (%"foo.1"*)* @bar to i8*), i8* bitcast (void ()* @thousandisland to i8*)], section "llvm.metadata"