Home | History | Annotate | Download | only in Internalize
      1 ; RUN: opt < %s -internalize -internalize-public-api-list c1 -internalize-public-api-list c2 -internalize-public-api-list c3 -internalize-public-api-list c4 -S | FileCheck %s
      2 
      3 $c1 = comdat any
      4 $c2 = comdat any
      5 $c3 = comdat any
      6 $c4 = comdat any
      7 
      8 ; CHECK: @c1_c = global i32 0, comdat($c1)
      9 @c1_c = global i32 0, comdat($c1)
     10 
     11 ; CHECK: @c2_b = internal global i32 0{{$}}
     12 @c2_b = global i32 0, comdat($c2)
     13 
     14 ; CHECK: @c3 = global i32 0, comdat{{$}}
     15 @c3 = global i32 0, comdat
     16 
     17 ; CHECK: @c4_a = internal global i32 0, comdat($c4)
     18 @c4_a = internal global i32 0, comdat($c4)
     19 
     20 ; CHECK: @c1_d = alias i32, i32* @c1_c
     21 @c1_d = alias i32, i32* @c1_c
     22 
     23 ; CHECK: @c2_c = internal alias i32, i32* @c2_b
     24 @c2_c = alias i32, i32* @c2_b
     25 
     26 ; CHECK: @c4 = alias i32, i32* @c4_a
     27 @c4 = alias i32, i32* @c4_a
     28 
     29 ; CHECK: define void @c1() comdat {
     30 define void @c1() comdat {
     31   ret void
     32 }
     33 
     34 ; CHECK: define void @c1_a() comdat($c1) {
     35 define void @c1_a() comdat($c1) {
     36   ret void
     37 }
     38 
     39 ; CHECK: define internal void @c2() {
     40 define internal void @c2() comdat {
     41   ret void
     42 }
     43 
     44 ; CHECK: define internal void @c2_a() {
     45 define void @c2_a() comdat($c2) {
     46   ret void
     47 }
     48 
     49 ; CHECK: define void @c3_a() comdat($c3) {
     50 define void @c3_a() comdat($c3) {
     51   ret void
     52 }
     53