brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · dc65fbe Raw
51 lines · plain
1; RUN: opt <%s -unified-lto -thinlto-split-lto-unit -thinlto-bc -o %t.bc2 3; Test internalization during unified LTO. This makes sure internalization does4; 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,px13; RUN: llvm-dis < %t.o.0.2.internalize.bc | FileCheck  %s14 15; CHECK: @llvm.used = appending global {{.*}} @bar16; CHECK: define dso_local dllexport void @thousandisland17; CHECK: define dso_local void @salad18; CHECK: define internal void @balsamic19; CHECK: define dso_local void @main20; CHECK: define available_externally void @egg()21 22target triple = "x86_64-scei-ps4"23target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"24 25define void @salad() {26    call void @balsamic()27    ret void28}29define void @balsamic() {30    ret void31}32define dllexport void @thousandisland() {33    ret void34}35 36define void @main() {37    ret void38}39 40define void ()* @ranch() {41  ret void ()* @egg42}43 44define available_externally void @egg() {45  ret void46}47 48%"foo.1" = type { i8, i8 }49declare dso_local i32 @bar(%"foo.1"* nocapture readnone %this) local_unnamed_addr50@llvm.used = appending global [2 x i8*] [i8* bitcast (i32 (%"foo.1"*)* @bar to i8*), i8* bitcast (void ()* @thousandisland to i8*)], section "llvm.metadata"51