Simplify away redundant test, and document what's going on.
[llvm/stm8.git] / test / Other / extract.ll
blob57573ed76f9a9064df905e7bd2535f6d192c9623
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 ; RUN: llvm-as < %s > %t
4 ; RUN: llvm-extract -func foo -S %t | FileCheck %s
5 ; RUN: llvm-extract -delete -func foo -S %t | FileCheck --check-prefix=DELETE %s
7 ; llvm-extract uses lazy bitcode loading, so make sure it correctly reads
8 ; from bitcode files in addition to assembly files.
10 ; CHECK: define void @foo() {
11 ; CHECK:   ret void
12 ; CHECK: }
14 ; The linkonce_odr linkage for foo() should be changed to external linkage.
15 ; DELETE: declare void @foo()
16 ; DELETE: define void @bar() {
17 ; DELETE:   call void @foo()
18 ; DELETE:   ret void
19 ; DELETE: }
21 define linkonce_odr void @foo() {
22   ret void
24 define void @bar() {
25   call void @foo()
26   ret void