28cfc7903fa405f020829d03887cb67159fbb4b8
[oota-llvm.git] / test / ExecutionEngine / MCJIT / load-object-a.ll
1 ; REQUIRES: shell
2
3 ; This first line will generate the .o files for the next run line
4 ; RUN: mkdir -p %t.cachedir
5 ; RUN: %lli_mcjit -extra-module=%p/Inputs/multi-module-b.ll -extra-module=%p/Inputs/multi-module-c.ll -enable-cache-manager -object-cache-dir=%t.cachedir %s
6
7 ; This line tests MCJIT object loading
8 ; RUN: %lli_mcjit -extra-object=%t.cachedir/%p/Inputs/multi-module-b.o -extra-object=%t.cachedir/%p/Inputs/multi-module-c.o %s
9
10 ; These lines put the object files into an archive
11 ; RUN: llvm-ar r %t.cachedir/%p/Inputs/load-object.a %t.cachedir/%p/Inputs/multi-module-b.o
12 ; RUN: llvm-ar r %t.cachedir/%p/Inputs/load-object.a %t.cachedir/%p/Inputs/multi-module-c.o
13
14 ; This line test MCJIT archive loading
15 ; RUN: %lli_mcjit -extra-archive=%t.cachedir/%p/Inputs/load-object.a %s
16
17 declare i32 @FB()
18
19 define i32 @main() {
20   %r = call i32 @FB( )   ; <i32> [#uses=1]
21   ret i32 %r
22 }