brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · a3d3415 Raw
50 lines · plain
1; RUN: llvm-link %s -S -o - | FileCheck %s2; RUN: llvm-link %s %S/Inputs/metadata-attach.ll -S -o - | FileCheck --check-prefix=CHECK-LINKED1 %s3; RUN: llvm-link %S/Inputs/metadata-attach.ll %s -S -o - | FileCheck --check-prefix=CHECK-LINKED2 %s4 5; CHECK: @g1 = global i32 0, !attach !0{{$}}6; CHECK-LINKED1: @g1 = global i32 0, !attach !0{{$}}7@g1 = global i32 0, !attach !08 9; CHECK: @g2 = external global i32, !attach !0{{$}}10; CHECK: @g3 = weak global i32 1, !attach !0{{$}}11; CHECK-LINKED1: @g2 = global i32 1, !attach !1{{$}}12@g2 = external global i32, !attach !013 14; CHECK-LINKED1: @g3 = global i32 2, !attach !1{{$}}15@g3 = weak global i32 1, !attach !016 17; CHECK-LINKED2: @g1 = global i32 0, !attach !0{{$}}18; CHECK-LINKED2: @g2 = global i32 1, !attach !1{{$}}19; CHECK-LINKED2: @g3 = global i32 2, !attach !1{{$}}20 21; CHECK: define void @f1() !attach !0 {22; CHECK-LINKED1: define void @f1() !attach !0 {23define void @f1() !attach !0 {24  call void @f2()25  store i32 0, ptr @g226  ret void27}28 29; CHECK: declare !attach !0 void @f2()30; CHECK-LINKED1: define void @f2() !attach !1 {31declare !attach !0 void @f2()32 33; CHECK: define weak void @f3() !attach !0 {34; CHECK-LINKED1: define void @f3() !attach !1 {35define weak void @f3() !attach !0 {36  ret void37}38 39; CHECK-LINKED2: define void @f2() !attach !1 {40; CHECK-LINKED2: define void @f3() !attach !1 {41; CHECK-LINKED2: define void @f1() !attach !0 {42 43; CHECK-LINKED1: !0 = !{i32 0}44; CHECK-LINKED1: !1 = !{i32 1}45 46; CHECK-LINKED2: !0 = !{i32 0}47; CHECK-LINKED2: !1 = !{i32 1}48 49!0 = !{i32 0}50