1 ; RUN: llvm-extract -func foo -S < %s | FileCheck %s
2 ; RUN: llvm-extract -delete -func foo -S < %s | FileCheck --check-prefix=DELETE %s
4 ; Test that linkonce definitions are mapped to weak so that they are not
7 ; CHECK: @bar = external global i32
8 ; CHECK: define weak ptr @foo() {
9 ; CHECK-NEXT: ret ptr @bar
12 ; DELETE: @bar = weak global i32 42
13 ; DELETE: declare ptr @foo()
15 @bar = linkonce global i32 42
17 define linkonce ptr @foo() {