rust/src/rt/main0.ll.in
Marijn Haverbeke 243c5c3479 Use snap runtime, and the old main.o, for stage1
This is intended to be reverted again after I register the next
snapshot.
2011-10-20 13:14:28 +02:00

44 lines
1.6 KiB
LLVM

%0 = type { i32, [1 x i32] }
%1 = type { i32, i32 }
%2 = type { i32, %3 }
%3 = type { %tydesc*, %4, i1, {} }
%4 = type { i1*, i1* }
%5 = type { i32, i32, i32, i32, [0 x %6*] }
%6 = type { i32, i32, i32, i32, [0 x i8] }
%tydesc = type { %tydesc**, i32, i32, void (i1*, %task*, i1*, %tydesc**, i8*)*, void (i1*, %task*, i1*, %tydesc**, i8*)*, void (i1*, %task*, i1*, %tydesc**, i8*)*, void (i1*, %task*, i1*, %tydesc**, i8*)*, void (i1*, %task*, i1*, %tydesc**, i8*)*, void (i1*, %task*, i1*, %tydesc**, i8*)*, void (i1*, %task*, i1*, %tydesc**, i8*)*, void (i1*, %task*, i1*, %tydesc**, i8*, i8*, i8)* }
%task = type { i32, i32, i32, i32, i32, i32, i32, i32 }
%vec = type { i32, i32, [0 x i8] }
@_rust_crate_map_toplevel = external global %0
declare i32 @rust_start(i32, i32, i32, i32)
declare external fastcc void @_rust_main(i1* nocapture, %task*, %2* nocapture, %vec*)
define void @_rust_main_wrap(i1* nocapture, %task *, %2* nocapture, %vec *)
{
tail call fastcc void @_rust_main(i1* %0, %task *%1, %2* nocapture %2, %vec* %3)
ret void
}
%nullary_fn = type void (i1*, %task*, %2*)
define void @_rust_spawn_wrap(
i1* nocapture, %task*, %2* nocapture, %nullary_fn* %f)
{
call void %f(i1* %0, %task *%1, %2* nocapture %2)
ret void
}
declare external void @set_spawn_wrapper(void (i1*, %task*, %2*, %nullary_fn*)*);
define i32 @"MAIN"(i32, i32) {
call void @set_spawn_wrapper(void (i1*, %task*, %2*, %nullary_fn*)* @_rust_spawn_wrap)
%result = tail call i32 @rust_start(i32 ptrtoint (void (i1*, %task*, %2*, %vec*)* @_rust_main_wrap to i32), i32 %0, i32 %1, i32 ptrtoint (%0* @_rust_crate_map_toplevel to i32))
ret i32 %result
}