Home | History | Annotate | Download | only in Bitcode
      1 ; RUN:  llvm-dis < %s.bc| FileCheck %s
      2 ; RUN:  verify-uselistorder < %s.bc
      3 
      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
      6 ; older bitcode files.
      7 
      8 @common.var = common global i32 0
      9 ; CHECK: @common.var = common global i32 0{{$}}
     10 
     11 @appending.var = appending global [8 x i32] undef
     12 ; CHECK: @appending.var = appending global [8 x i32] undef{{$}}
     13 
     14 @extern_weak.var = extern_weak global i32
     15 ; CHECK: @extern_weak.var = extern_weak global i32{{$}}
     16 
     17 @private.var = private constant i32 0
     18 ; CHECK: @private.var = private constant i32 0{{$}}
     19 
     20 @linker_private.var = linker_private constant i32 0
     21 ; CHECK: @linker_private.var = private constant i32 0{{$}}
     22 
     23 @linker_private_weak.var = linker_private_weak constant i32 0
     24 ; CHECK: @linker_private_weak.var = private constant i32 0{{$}}
     25 
     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{{$}}
     28 
     29 @internal.var = internal constant i32 0
     30 ; CHECK: @internal.var = internal constant i32 0{{$}}
     31 
     32 @available_externally.var = available_externally constant i32 0
     33 ; CHECK: @available_externally.var = available_externally constant i32 0{{$}}
     34 
     35 @linkonce.var = linkonce constant i32 0
     36 ; CHECK: @linkonce.var = linkonce constant i32 0, comdat{{$}}
     37 
     38 @weak.var = weak constant i32 0
     39 ; CHECK: @weak.var = weak constant i32 0, comdat{{$}}
     40 
     41 @linkonce_odr.var = linkonce_odr constant i32 0
     42 ; CHECK: @linkonce_odr.var = linkonce_odr constant i32 0, comdat{{$}}
     43 
     44 @linkonce_odr_auto_hide.var = linkonce_odr_auto_hide constant i32 0
     45 ; CHECK: @linkonce_odr_auto_hide.var = constant i32 0{{$}}
     46 
     47 @external.var = external constant i32
     48 ; CHECK: @external.var = external constant i32{{$}}
     49 
     50 @dllexport.var = dllexport global i32 0
     51 ; CHECK: @dllexport.var = dllexport global i32 0{{$}}
     52 
     53 @dllimport.var = dllimport global i32
     54 ; CHECK: @dllimport.var = external dllimport global i32{{$}}
     55 
     56 define private void @private()
     57 ; CHECK: define private void @private() {
     58 {
     59   ret void
     60 }
     61 
     62 define linker_private void @linker_private()
     63 ; CHECK: define private void @linker_private() {
     64 {
     65   ret void
     66 }
     67 
     68 define linker_private_weak void @linker_private_weak()
     69 ; CHECK: define private void @linker_private_weak() {
     70 {
     71   ret void
     72 }
     73 
     74 define linker_private_weak_def_auto void @linker_private_weak_def_auto()
     75 ; CHECK: define void @linker_private_weak_def_auto() {
     76 {
     77   ret void
     78 }
     79 
     80 define internal void @internal()
     81 ; CHECK: define internal void @internal() {
     82 {
     83   ret void
     84 }
     85 
     86 define available_externally void @available_externally()
     87 ; CHECK: define available_externally void @available_externally() {
     88 {
     89   ret void
     90 }
     91 
     92 define linkonce void @linkonce()
     93 ; CHECK: define linkonce void @linkonce() comdat {
     94 {
     95   ret void
     96 }
     97 
     98 define weak void @weak()
     99 ; CHECK: define weak void @weak() comdat {
    100 {
    101   ret void
    102 }
    103 
    104 define linkonce_odr void @linkonce_odr()
    105 ; CHECK: define linkonce_odr void @linkonce_odr() comdat {
    106 {
    107   ret void
    108 }
    109 
    110 define linkonce_odr_auto_hide void @linkonce_odr_auto_hide()
    111 ; CHECK: define void @linkonce_odr_auto_hide() {
    112 {
    113   ret void
    114 }
    115 
    116 define external void @external()
    117 ; CHECK: define void @external() {
    118 {
    119   ret void
    120 }
    121 
    122 declare dllimport void @dllimport()
    123 ; CHECK: declare dllimport void @dllimport(){{$}}
    124 
    125 define dllexport void @dllexport()
    126 ; CHECK: define dllexport void @dllexport() {
    127 {
    128   ret void
    129 }
    130