Lang Hames | 44780ac | 2015-10-06 22:55:05 +0000 | [diff] [blame] | 1 | ; RUN: lli -jit-kind=orc-lazy %s |
2 | ; | ||||
3 | ; Test handling of global aliases for function and variables. | ||||
4 | |||||
5 | @x = global i32 42, align 4 | ||||
6 | @y = alias i32, i32* @x | ||||
7 | |||||
8 | define i32 @foo() { | ||||
9 | entry: | ||||
10 | %0 = load i32, i32* @y, align 4 | ||||
11 | ret i32 %0 | ||||
12 | } | ||||
13 | |||||
14 | @bar = alias i32(), i32()* @foo | ||||
15 | |||||
16 | define i32 @main(i32 %argc, i8** %argv) { | ||||
17 | entry: | ||||
18 | %0 = call i32() @bar() | ||||
19 | %1 = sub i32 %0, 42 | ||||
20 | ret i32 %1 | ||||
21 | } |