• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; REQUIRES: x86
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
6
7target triple = "x86_64-unknown-linux-gnu"
8target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
9
10define void @_start() {
11  ret void
12}
13
14define void @foo() {
15  ret void
16}
17
18define hidden void @bar() {
19  ret void
20}
21
22define linkonce_odr void @zed() local_unnamed_addr {
23  ret void
24}
25
26define linkonce_odr void @zed2() unnamed_addr {
27  ret void
28}
29
30define linkonce_odr void @bah() {
31  ret void
32}
33
34define linkonce_odr void @baz() {
35  ret void
36}
37
38@use_baz = global void ()* @baz
39
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()
48