brintos

brintos / llvm-project-archived public Read only

0
0
Text · 541 B · 944ce7c Raw
25 lines · plain
1; RUN: llvm-extract -func foo -S < %s | FileCheck %s2; RUN: llvm-extract -delete -func foo -S < %s | FileCheck --check-prefix=DELETE %s3 4; Test that linkonce definitions are mapped to weak so that they are not5; dropped.6 7; CHECK:      @bar = external global i328; CHECK:      define weak ptr @foo() {9; CHECK-NEXT:  ret ptr @bar10; CHECK-NEXT: }11 12; DELETE: @bar = weak global i32 4213; DELETE: declare ptr @foo()14 15@bar = linkonce global i32 4216 17define linkonce ptr @foo() {18  ret ptr @bar19}20 21define void @g() {22  call ptr @foo()23  ret void24}25