blob: 080bf6cf584286e9cd7502906b86364de0af7f25 [file] [log] [blame]
Lang Hames7b6f99f2014-01-08 16:31:16 +00001; This first line will generate the .o files for the next run line
NAKAMURA Takumieccd28d2014-01-13 05:55:10 +00002; RUN: rm -rf %t.cachedir %t.cachedir2 %t.cachedir3
3; RUN: mkdir -p %t.cachedir %t.cachedir2 %t.cachedir3
Eric Christopher79cc1e32014-09-02 22:28:02 +00004; RUN: %lli -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
Lang Hames7b6f99f2014-01-08 16:31:16 +00005
NAKAMURA Takumi52f9d382014-01-10 10:38:23 +00006; Collect generated objects.
NAKAMURA Takumi52f9d382014-01-10 10:38:23 +00007; RUN: find %t.cachedir -type f -name 'multi-module-?.o' -exec mv -v '{}' %t.cachedir2 ';'
8
Lang Hames7b6f99f2014-01-08 16:31:16 +00009; This line tests MCJIT object loading
Eric Christopher79cc1e32014-09-02 22:28:02 +000010; RUN: %lli -extra-object=%t.cachedir2/multi-module-b.o -extra-object=%t.cachedir2/multi-module-c.o %s
NAKAMURA Takumi52f9d382014-01-10 10:38:23 +000011
Lang Hames7b6f99f2014-01-08 16:31:16 +000012; These lines put the object files into an archive
NAKAMURA Takumi52f9d382014-01-10 10:38:23 +000013; 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
Lang Hames7b6f99f2014-01-08 16:31:16 +000015
16; This line test MCJIT archive loading
Eric Christopher79cc1e32014-09-02 22:28:02 +000017; RUN: %lli -extra-archive=%t.cachedir3/load-object.a %s
Lang Hames7b6f99f2014-01-08 16:31:16 +000018
19declare i32 @FB()
20
21define i32 @main() {
22 %r = call i32 @FB( ) ; <i32> [#uses=1]
23 ret i32 %r
24}