1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-24 21:42:54 +02:00
llvm-mirror/test/ExecutionEngine/OrcLazy/global_aliases.ll
Lang Hames 2edf58639e [Orc] Teach the CompileOnDemand layer to clone aliases.
This allows modules containing aliases to be lazily jit'd. Previously these
failed with missing symbol errors because the aliases weren't cloned from the
original module.

llvm-svn: 249481
2015-10-06 22:55:05 +00:00

22 lines
372 B
LLVM

; RUN: lli -jit-kind=orc-lazy %s
;
; Test handling of global aliases for function and variables.
@x = global i32 42, align 4
@y = alias i32, i32* @x
define i32 @foo() {
entry:
%0 = load i32, i32* @y, align 4
ret i32 %0
}
@bar = alias i32(), i32()* @foo
define i32 @main(i32 %argc, i8** %argv) {
entry:
%0 = call i32() @bar()
%1 = sub i32 %0, 42
ret i32 %1
}