[RuntimeDyld] Make sure we emit MachO __eh_frame and __gcc_except_tab sections,
[oota-llvm.git] / test / Other / extract.ll
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
6
7 ; llvm-extract uses lazy bitcode loading, so make sure it correctly reads
8 ; from bitcode files in addition to assembly files.
9
10 ; CHECK: define hidden void @foo() {
11 ; CHECK:   ret void
12 ; CHECK: }
13
14 ; The private linkage for foo() should be changed to external linkage and
15 ; hidden visibility added.
16 ; DELETE: declare hidden void @foo()
17 ; DELETE: define void @bar() {
18 ; DELETE:   call void @foo()
19 ; DELETE:   ret void
20 ; DELETE: }
21
22 define private void @foo() {
23   ret void
24 }
25 define void @bar() {
26   call void @foo()
27   ret void
28 }