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 ptr @foo() {
8 ; CHECK-NEXT: ret ptr @bar
11 ; DELETE: @bar = weak_odr global i32 42
12 ; DELETE: declare ptr @foo()
14 @bar = weak_odr global i32 42
16 define weak_odr ptr @foo() {