1; This first line will generate the .o files for the next run line
2; RUN: rm -rf %t.cachedir %t.cachedir2 %t.cachedir3
3; RUN: mkdir -p %t.cachedir %t.cachedir2 %t.cachedir3
4; RUN: %lli -jit-kind=orc-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
5
6; Collect generated objects.
7; RUN: find %t.cachedir -type f -name 'multi-module-?.o' -exec mv -v '{}' %t.cachedir2 ';'
8
9; This line tests MCJIT object loading
10; RUN: %lli -jit-kind=orc-mcjit -extra-object=%t.cachedir2/multi-module-b.o -extra-object=%t.cachedir2/multi-module-c.o %s
11
12; These lines put the object files into an archive
13; RUN: llvm-ar r %t.cachedir3/load-object.a %t.cachedir2/multi-module-b.o
14; RUN: llvm-ar r %t.cachedir3/load-object.a %t.cachedir2/multi-module-c.o
15
16; This line test MCJIT archive loading
17; RUN: %lli -jit-kind=orc-mcjit -extra-archive=%t.cachedir3/load-object.a %s
18
19declare i32 @FB()
20
21define i32 @main() {
22  %r = call i32 @FB( )   ; <i32> [#uses=1]
23  ret i32 %r
24}
25