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 i32* @foo() {
9 ; CHECK-NEXT: ret i32* @bar
12 ; DELETE: @bar = weak global i32 42
13 ; DELETE: declare i32* @foo()
15 @bar = linkonce global i32 42
17 define linkonce i32* @foo() {