1 ; RUN: llvm-extract -func foo -S < %s | FileCheck %s 2 ; RUN: llvm-extract -delete -func foo -S < %s | FileCheck --check-prefix=DELETE %s 3 4 ; Test that we don't convert weak_odr to external definitions. 5 6 ; CHECK: @bar = external global i32 7 ; CHECK: define weak_odr i32* @foo() { 8 ; CHECK-NEXT: ret i32* @bar 9 ; CHECK-NEXT: } 10 11 ; DELETE: @bar = weak_odr global i32 42 12 ; DELETE: declare i32* @foo() 13 14 @bar = weak_odr global i32 42 15 16 define weak_odr i32* @foo() { 17 ret i32* @bar 18 } 19 20 define void @g() { 21 %c = call i32* @foo() 22 ret void 23 } 24