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 we don't convert weak_odr to external definitions.
6 ; CHECK: @bar = external global i32
7 ; CHECK: define weak_odr i32* @foo() {
8 ; CHECK-NEXT: ret i32* @bar
11 ; DELETE: @bar = weak_odr global i32 42
12 ; DELETE: declare i32* @foo()
14 @bar = weak_odr global i32 42
16 define weak_odr i32* @foo() {