1 ; RUN: llvm-dis < %s.bc| FileCheck %s
2 ; RUN: verify-uselistorder < %s.bc
4 ; linkage-types-3.2.ll.bc was generated by passing this file to llvm-as-3.2
5 ; The test checks that LLVM does not silently misread linkage types of
8 @common.var = common global i32 0
9 ; CHECK: @common.var = common global i32 0{{$}}
11 @appending.var = appending global [8 x i32] undef
12 ; CHECK: @appending.var = appending global [8 x i32] undef{{$}}
14 @extern_weak.var = extern_weak global i32
15 ; CHECK: @extern_weak.var = extern_weak global i32{{$}}
17 @private.var = private constant i32 0
18 ; CHECK: @private.var = private constant i32 0{{$}}
20 @linker_private.var = linker_private constant i32 0
21 ; CHECK: @linker_private.var = private constant i32 0{{$}}
23 @linker_private_weak.var = linker_private_weak constant i32 0
24 ; CHECK: @linker_private_weak.var = private constant i32 0{{$}}
26 @linker_private_weak_def_auto.var = linker_private_weak_def_auto constant i32 0
27 ; CHECK: @linker_private_weak_def_auto.var = constant i32 0{{$}}
29 @internal.var = internal constant i32 0
30 ; CHECK: @internal.var = internal constant i32 0{{$}}
32 @available_externally.var = available_externally constant i32 0
33 ; CHECK: @available_externally.var = available_externally constant i32 0{{$}}
35 @linkonce.var = linkonce constant i32 0
36 ; CHECK: @linkonce.var = linkonce constant i32 0, comdat{{$}}
38 @weak.var = weak constant i32 0
39 ; CHECK: @weak.var = weak constant i32 0, comdat{{$}}
41 @linkonce_odr.var = linkonce_odr constant i32 0
42 ; CHECK: @linkonce_odr.var = linkonce_odr constant i32 0, comdat{{$}}
44 @linkonce_odr_auto_hide.var = linkonce_odr_auto_hide constant i32 0
45 ; CHECK: @linkonce_odr_auto_hide.var = constant i32 0{{$}}
47 @external.var = external constant i32
48 ; CHECK: @external.var = external constant i32{{$}}
50 @dllexport.var = dllexport global i32 0
51 ; CHECK: @dllexport.var = dllexport global i32 0{{$}}
53 @dllimport.var = dllimport global i32
54 ; CHECK: @dllimport.var = external dllimport global i32{{$}}
56 define private void @private()
57 ; CHECK: define private void @private() {
62 define linker_private void @linker_private()
63 ; CHECK: define private void @linker_private() {
68 define linker_private_weak void @linker_private_weak()
69 ; CHECK: define private void @linker_private_weak() {
74 define linker_private_weak_def_auto void @linker_private_weak_def_auto()
75 ; CHECK: define void @linker_private_weak_def_auto() {
80 define internal void @internal()
81 ; CHECK: define internal void @internal() {
86 define available_externally void @available_externally()
87 ; CHECK: define available_externally void @available_externally() {
92 define linkonce void @linkonce()
93 ; CHECK: define linkonce void @linkonce() comdat {
98 define weak void @weak()
99 ; CHECK: define weak void @weak() comdat {
104 define linkonce_odr void @linkonce_odr()
105 ; CHECK: define linkonce_odr void @linkonce_odr() comdat {
110 define linkonce_odr_auto_hide void @linkonce_odr_auto_hide()
111 ; CHECK: define void @linkonce_odr_auto_hide() {
116 define external void @external()
117 ; CHECK: define void @external() {
122 declare dllimport void @dllimport()
123 ; CHECK: declare dllimport void @dllimport(){{$}}
125 define dllexport void @dllexport()
126 ; CHECK: define dllexport void @dllexport() {