Home | History | Annotate | Download | only in Linker
      1 ; RUN: llvm-link %s %p/visibility2.ll -S | FileCheck %s
      2 ; RUN: llvm-link %p/visibility2.ll %s -S | FileCheck %s
      3 
      4 ; The values in this file are strong, the ones in visibility2.ll are weak,
      5 ; but we should still get the visibility from them.
      6 
      7 ; Variables
      8 ; CHECK: @v1 = hidden global i32 0
      9 @v1 = global i32 0
     10 
     11 ; CHECK: @v2 = protected  global i32 0
     12 @v2 = global i32 0
     13 
     14 ; CHECK: @v3 = hidden global i32 0
     15 @v3 = protected global i32 0
     16 
     17 
     18 ; Aliases
     19 ; CHECK: @a1 = hidden alias i32* @v1
     20 @a1 = alias i32* @v1
     21 
     22 ; CHECK: @a2 = protected alias i32* @v2
     23 @a2 = alias i32* @v2
     24 
     25 ; CHECK: @a3 = hidden alias i32* @v3
     26 @a3 = protected alias i32* @v3
     27 
     28 
     29 ; Functions
     30 ; CHECK: define hidden void @f1()
     31 define void @f1()  {
     32 entry:
     33   ret void
     34 }
     35 
     36 ; CHECK: define protected void @f2()
     37 define void @f2()  {
     38 entry:
     39   ret void
     40 }
     41 
     42 ; CHECK: define hidden void @f3()
     43 define protected void @f3()  {
     44 entry:
     45   ret void
     46 }
     47