2015-04-25 02:13:27 +08:00
|
|
|
; RUN: llvm-as < %s >%t1
|
2013-11-01 04:51:58 +08:00
|
|
|
; RUN: llvm-lto -o %t2 -dso-symbol=foo1 -dso-symbol=foo2 -dso-symbol=foo3 \
|
2016-06-15 05:01:22 +08:00
|
|
|
; RUN: -dso-symbol=v1 -dso-symbol=v2 -dso-symbol=v3 \
|
|
|
|
; RUN: -dso-symbol=v4 -dso-symbol=v5 -dso-symbol=v6 %t1 -O0
|
2013-11-01 04:51:58 +08:00
|
|
|
; RUN: llvm-nm %t2 | FileCheck %s
|
2013-10-26 05:29:52 +08:00
|
|
|
|
2013-11-02 14:00:09 +08:00
|
|
|
target 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"
|
|
|
|
target triple = "x86_64-unknown-linux-gnu"
|
2013-11-01 05:27:02 +08:00
|
|
|
|
2016-06-15 05:01:22 +08:00
|
|
|
; CHECK: W foo1
|
2013-11-02 14:00:09 +08:00
|
|
|
define linkonce_odr void @foo1() noinline {
|
2013-10-26 05:29:52 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2016-06-15 05:01:22 +08:00
|
|
|
; CHECK: t foo2
|
|
|
|
define linkonce_odr void @foo2() local_unnamed_addr noinline {
|
2013-10-26 05:29:52 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2013-11-01 04:51:58 +08:00
|
|
|
; CHECK: t foo3
|
2016-06-15 05:01:22 +08:00
|
|
|
define linkonce_odr void @foo3() unnamed_addr noinline {
|
2013-10-26 05:29:52 +08:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2016-06-15 05:01:22 +08:00
|
|
|
; CHECK: V v1
|
2014-02-08 03:04:43 +08:00
|
|
|
@v1 = linkonce_odr constant i32 32
|
|
|
|
|
2016-06-15 05:01:22 +08:00
|
|
|
; CHECK: r v2
|
|
|
|
@v2 = linkonce_odr local_unnamed_addr constant i32 32
|
2014-12-09 02:45:16 +08:00
|
|
|
|
2016-06-15 05:01:22 +08:00
|
|
|
; CHECK: r v3
|
|
|
|
@v3 = linkonce_odr unnamed_addr constant i32 32
|
2014-02-08 03:04:43 +08:00
|
|
|
|
2016-06-15 05:01:22 +08:00
|
|
|
; CHECK: V v4
|
|
|
|
@v4 = linkonce_odr global i32 32
|
2014-12-09 02:45:16 +08:00
|
|
|
|
2016-06-15 05:01:22 +08:00
|
|
|
; CHECK: V v5
|
|
|
|
@v5 = linkonce_odr local_unnamed_addr global i32 32
|
2013-10-26 05:29:52 +08:00
|
|
|
|
2016-06-15 05:01:22 +08:00
|
|
|
; CHECK: d v6
|
|
|
|
@v6 = linkonce_odr unnamed_addr global i32 32
|
2013-11-01 04:51:58 +08:00
|
|
|
|
2016-06-15 05:01:22 +08:00
|
|
|
define void @use() {
|
2013-11-02 14:00:09 +08:00
|
|
|
call void @foo1()
|
2016-06-15 05:01:22 +08:00
|
|
|
call void @foo2()
|
|
|
|
call void @foo3()
|
|
|
|
%x1 = load i32, i32* @v1
|
|
|
|
%x2 = load i32, i32* @v2
|
|
|
|
%x3 = load i32, i32* @v3
|
|
|
|
%x4 = load i32, i32* @v4
|
|
|
|
%x5 = load i32, i32* @v5
|
|
|
|
%x6 = load i32, i32* @v6
|
2013-10-26 05:29:52 +08:00
|
|
|
ret void
|
|
|
|
}
|