1 ; RUN: opt -module-summary %s -o %t1.bc
2 ; RUN: llvm-lto -thinlto-action=thinlink -o %t.index.bc %t1.bc
3 ;; Check baseline when both of them internalized when not exported.
4 ; RUN: llvm-lto -thinlto-action=internalize -thinlto-index %t.index.bc %t1.bc -o - --exported-symbol=_exported | llvm-dis -o - | FileCheck %s --check-prefix=INTERNALIZED
5 ;; Check symbols are exported, including the ones with `\01` prefix.
6 ; RUN: llvm-lto -thinlto-action=internalize -thinlto-index %t.index.bc %t1.bc -o - --exported-symbol=_exported --exported-symbol=_extern_not_mangled --exported-symbol=_extern_mangled | llvm-dis -o - | FileCheck %s --check-prefix=EXPORTED
8 ; INTERNALIZED: define internal void @extern_not_mangled
9 ; INTERNALIZED: define internal void @"\01_extern_mangled"
10 ; EXPORTED: define void @extern_not_mangled
11 ; EXPORTED: define void @"\01_extern_mangled"
13 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
14 target triple = "x86_64-apple-macosx10.11.0"
16 define void @exported() {
20 define void @extern_not_mangled() {
24 define void @"\01_extern_mangled"() {