2 ; RUN: llvm-as %s -o %t.o
3 ; RUN: llvm-as %p/Inputs/internalize-exportdyn.ll -o %t2.o
4 ; RUN: ld.lld %t.o %t2.o -o %t2 --export-dynamic -save-temps
5 ; RUN: llvm-dis < %t2.0.2.internalize.bc | FileCheck %s
7 target triple = "x86_64-unknown-linux-gnu"
8 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
10 define void @_start() {
18 define hidden void @bar() {
22 define linkonce_odr void @zed() local_unnamed_addr {
26 define linkonce_odr void @zed2() unnamed_addr {
30 define linkonce_odr void @bah() {
34 define linkonce_odr void @baz() {
38 @use_baz = global ptr @baz
40 ; Check what gets internalized.
41 ; CHECK: define dso_local void @_start()
42 ; CHECK: define dso_local void @foo()
43 ; CHECK: define internal void @bar()
44 ; CHECK: define internal void @zed()
45 ; CHECK: define internal void @zed2()
46 ; CHECK: define weak_odr dso_local void @bah()
47 ; CHECK: define weak_odr dso_local void @baz()