43 lines · plain
1; RUN: opt %s -o %t1.bc2 3; RUN: llvm-lto %t1.bc -o %t1.save.opt --exported-symbol=_foo -save-merged-module -O04; RUN: llvm-dis < %t1.save.opt.merged.bc | FileCheck %s --check-prefix=INTERNALIZE5 6; Test the enable-lto-internalization option by setting it to false.7; This makes sure internalization does not happen.8; RUN: llvm-lto %t1.bc -enable-lto-internalization=false -o %t1.save.opt \9; RUN: --exported-symbol=_foo -save-merged-module -O010; RUN: llvm-dis < %t1.save.opt.merged.bc | FileCheck %s --check-prefix=INTERNALIZE-OPTION-DISABLE11 12; RUN: llvm-lto2 run %t1.bc -o %t.o -save-temps \13; RUN: -r=%t1.bc,_foo,pxl \14; RUN: -r=%t1.bc,_bar,pl15; RUN: llvm-dis < %t.o.0.2.internalize.bc | FileCheck %s --check-prefix=INTERNALIZE216 17; Test the enable-lto-internalization option by setting it to false.18; This makes sure internalization does not happen in runRegularLTO().19; RUN: llvm-lto2 run %t1.bc -o %t.o -save-temps -enable-lto-internalization=false \20; RUN: -r=%t1.bc,_foo,pxl \21; RUN: -r=%t1.bc,_bar,pl22; RUN: llvm-dis < %t.o.0.2.internalize.bc | FileCheck %s --check-prefix=INTERNALIZE2-OPTION-DISABLE23 24; INTERNALIZE: define void @foo25; INTERNALIZE: define internal void @bar26; INTERNALIZE-OPTION-DISABLE: define void @foo27; INTERNALIZE-OPTION-DISABLE: define void @bar28; INTERNALIZE2: define dso_local void @foo29; INTERNALIZE2: define internal void @bar30; INTERNALIZE2-OPTION-DISABLE: define dso_local void @foo31; INTERNALIZE2-OPTION-DISABLE: define dso_local void @bar32 33target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"34target triple = "x86_64-apple-macosx10.11.0"35 36define void @foo() {37 call void @bar()38 ret void39}40define void @bar() {41 ret void42}43