1; RUN: llvm-as < %s >%t1
2; RUN: llvm-lto -o %t2 -dso-symbol=foo1 -dso-symbol=foo2 -dso-symbol=foo3 \
3; RUN:     -dso-symbol=v1 -dso-symbol=v2 -dso-symbol=v3 \
4; RUN:     -dso-symbol=v4 -dso-symbol=v5 -dso-symbol=v6 %t1 -O0
5; RUN: llvm-nm %t2 | FileCheck %s
6
7target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
8target triple = "x86_64-unknown-linux-gnu"
9
10; CHECK: W foo1
11define linkonce_odr void @foo1() noinline {
12  ret void
13}
14
15; CHECK: t foo2
16define linkonce_odr void @foo2() local_unnamed_addr noinline {
17  ret void
18}
19
20; CHECK: t foo3
21define linkonce_odr void @foo3() unnamed_addr noinline {
22  ret void
23}
24
25; CHECK: V v1
26@v1 = linkonce_odr constant i32 32
27
28; CHECK: r v2
29@v2 = linkonce_odr local_unnamed_addr constant i32 32
30
31; CHECK: r v3
32@v3 = linkonce_odr unnamed_addr constant i32 32
33
34; CHECK: V v4
35@v4 = linkonce_odr global i32 32
36
37; CHECK: V v5
38@v5 = linkonce_odr local_unnamed_addr global i32 32
39
40; CHECK: d v6
41@v6 = linkonce_odr unnamed_addr global i32 32
42
43define void @use() {
44  call void @foo1()
45  call void @foo2()
46  call void @foo3()
47  %x1 = load i32, i32* @v1
48  %x2 = load i32, i32* @v2
49  %x3 = load i32, i32* @v3
50  %x4 = load i32, i32* @v4
51  %x5 = load i32, i32* @v5
52  %x6 = load i32, i32* @v6
53  ret void
54}
55