llvm/test/ExecutionEngine/MCJIT/load-object-a.ll: Fix not to use %t.cachedir/%p.
[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: rm -rf %t.cachedir
5 ; RUN: mkdir -p %t.cachedir
6 ; 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
7
8 ; Collect generated objects.
9 ; RUN: rm -rf %t.cachedir2
10 ; RUN: mkdir -p %t.cachedir2
11 ; RUN: find %t.cachedir -type f -name 'multi-module-?.o' -exec mv -v '{}' %t.cachedir2 ';'
12
13 ; This line tests MCJIT object loading
14 ; RUN: %lli_mcjit -extra-object=%t.cachedir2/multi-module-b.o -extra-object=%t.cachedir2/multi-module-c.o %s
15
16 ; RUN: rm -rf %t.cachedir3
17 ; RUN: mkdir -p %t.cachedir3
18
19 ; These lines put the object files into an archive
20 ; RUN: llvm-ar r %t.cachedir3/load-object.a %t.cachedir2/multi-module-b.o
21 ; RUN: llvm-ar r %t.cachedir3/load-object.a %t.cachedir2/multi-module-c.o
22
23 ; This line test MCJIT archive loading
24 ; RUN: %lli_mcjit -extra-archive=%t.cachedir3/load-object.a %s
25
26 declare i32 @FB()
27
28 define i32 @main() {
29   %r = call i32 @FB( )   ; <i32> [#uses=1]
30   ret i32 %r
31 }