Skip to content

Commit

Permalink
rustc: Declare rust_start as a function
Browse files Browse the repository at this point in the history
Issue #2167
  • Loading branch information
lht committed Apr 9, 2012
1 parent 9e1e42d commit 460b92a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/rustc/middle/trans/base.rs
Expand Up @@ -4497,9 +4497,7 @@ fn create_main_wrapper(ccx: @crate_ctxt, sp: span, main_llfn: ValueRef,
let crate_map = ccx.crate_map;
let start_ty = T_fn([val_ty(rust_main), ccx.int_type, ccx.int_type,
val_ty(crate_map)], ccx.int_type);
let start = str::as_c_str("rust_start", {|buf|
llvm::LLVMAddGlobal(ccx.llmod, start_ty, buf)
});
let start = decl_cdecl_fn(ccx.llmod, "rust_start", start_ty);
let args = [rust_main, llvm::LLVMGetParam(llfn, 0 as c_uint),
llvm::LLVMGetParam(llfn, 1 as c_uint), crate_map];
let result = unsafe {
Expand Down

0 comments on commit 460b92a

Please sign in to comment.