1 ; RUN: opt %s -o %t1.bc
3 ; RUN: llvm-lto %t1.bc -o %t1.save.opt --exported-symbol=_foo -save-merged-module -O0
4 ; RUN: llvm-dis < %t1.save.opt.merged.bc | FileCheck %s --check-prefix=INTERNALIZE
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 -O0
10 ; RUN: llvm-dis < %t1.save.opt.merged.bc | FileCheck %s --check-prefix=INTERNALIZE-OPTION-DISABLE
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,pl
15 ; RUN: llvm-dis < %t.o.0.2.internalize.bc | FileCheck %s --check-prefix=INTERNALIZE2
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,pl
22 ; RUN: llvm-dis < %t.o.0.2.internalize.bc | FileCheck %s --check-prefix=INTERNALIZE2-OPTION-DISABLE
24 ; INTERNALIZE: define void @foo
25 ; INTERNALIZE: define internal void @bar
26 ; INTERNALIZE-OPTION-DISABLE: define void @foo
27 ; INTERNALIZE-OPTION-DISABLE: define void @bar
28 ; INTERNALIZE2: define dso_local void @foo
29 ; INTERNALIZE2: define internal void @bar
30 ; INTERNALIZE2-OPTION-DISABLE: define dso_local void @foo
31 ; INTERNALIZE2-OPTION-DISABLE: define dso_local void @bar
33 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
34 target triple = "x86_64-apple-macosx10.11.0"