2014-01-08 16:31:16 +00:00
|
|
|
; This first line will generate the .o files for the next run line
|
2014-01-13 05:55:10 +00:00
|
|
|
; RUN: rm -rf %t.cachedir %t.cachedir2 %t.cachedir3
|
|
|
|
; RUN: mkdir -p %t.cachedir %t.cachedir2 %t.cachedir3
|
2014-08-07 22:02:54 +00:00
|
|
|
; 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
|
2014-01-08 16:31:16 +00:00
|
|
|
|
2014-01-10 10:38:23 +00:00
|
|
|
; Collect generated objects.
|
|
|
|
; RUN: find %t.cachedir -type f -name 'multi-module-?.o' -exec mv -v '{}' %t.cachedir2 ';'
|
|
|
|
|
2014-01-08 16:31:16 +00:00
|
|
|
; This line tests MCJIT object loading
|
2014-08-07 22:02:54 +00:00
|
|
|
; RUN: %lli_mcjit -extra-object=%t.cachedir2/multi-module-b.o -extra-object=%t.cachedir2/multi-module-c.o %s
|
2014-01-10 10:38:23 +00:00
|
|
|
|
2014-01-08 16:31:16 +00:00
|
|
|
; These lines put the object files into an archive
|
2014-01-10 10:38:23 +00:00
|
|
|
; RUN: llvm-ar r %t.cachedir3/load-object.a %t.cachedir2/multi-module-b.o
|
|
|
|
; RUN: llvm-ar r %t.cachedir3/load-object.a %t.cachedir2/multi-module-c.o
|
2014-01-08 16:31:16 +00:00
|
|
|
|
|
|
|
; This line test MCJIT archive loading
|
2014-08-07 22:02:54 +00:00
|
|
|
; RUN: %lli_mcjit -extra-archive=%t.cachedir3/load-object.a %s
|
2014-01-08 16:31:16 +00:00
|
|
|
|
|
|
|
declare i32 @FB()
|
|
|
|
|
|
|
|
define i32 @main() {
|
|
|
|
%r = call i32 @FB( ) ; <i32> [#uses=1]
|
|
|
|
ret i32 %r
|
|
|
|
}
|