1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/test/ExecutionEngine/OrcLazy/static-library-support.ll
Lang Hames df818b7034 [ORC] Don't require a null-terminator on MemoryBuffers for objects in archives.
The MemoryBuffer::getMemBuffer method's RequiresNullTerminator parameter
defaults to true, but object files are not null terminated so we need to
explicitly pass false here.
2020-04-01 12:16:38 -07:00

14 lines
453 B
LLVM

; This first line will generate the .o files for the next run line
; RUN: rm -rf %t && mkdir -p %t
; RUN: llc -filetype=obj -o %t/foo.o %p/Inputs/foo-return-i32-0.ll
; RUN: llc -filetype=obj -o %t/bar.o %p/Inputs/bar-return-i32-call-foo.ll
; RUN: llvm-ar r %t/staticlib.a %t/foo.o %t/bar.o
; RUN: lli -jit-kind=orc-lazy -extra-archive %t/staticlib.a %s
declare i32 @bar()
define i32 @main() {
%r = call i32 @bar() ; <i32> [#uses=1]
ret i32 %r
}