/// Creates an LLVM function corresponding to a source language function.
Creates an LLVM function corresponding to a source language function.
Creates an LLVM function corresponding to a source language function .
pub fn trans_fn<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>,
                          decl: &hir::FnDecl,
                          body: &hir::Block,
                          llfndecl: ValueRef,
                          param_substs: &'tcx Substs<'tcx>,
                          id: ast::NodeId,
                          attrs: &[hir::Attribute]) {
    let _s = StatRecorder::new(ccx, ccx.tcx().map.path_to_string(id).to_string());
    debug!("trans_fn(param_substs={:?})", param_substs);
    let _icx = push_ctxt("trans_fn");
    let fn_ty = ccx.tcx().node_id_to_type(id);
    let output_type = ccx.tcx().erase_late_bound_regions(&fn_ty.fn_ret());
    let abi = fn_ty.fn_abi();
    trans_closure(ccx, decl, body, llfndecl, param_substs, id, attrs, output_type, abi,
                  closure::ClosureEnv::NotClosure);
}
pub fn trans_fn < ' a , ' tcx > ( ccx : & CrateContext < ' a , ' tcx > , decl : & hir :: FnDecl , body : & hir :: Block , llfndecl : ValueRef , param_substs : & ' tcx Substs < ' tcx > , id : ast :: NodeId , attrs : & [ hir :: Attribute ] ) { let _s = StatRecorder :: new ( ccx , ccx . tcx ( ) . map . path_to_string ( id ) . to_string ( ) ) ; debug ! ( " " param_substs ) ; let _icx = push_ctxt ( " " ) ; let fn_ty = ccx . tcx ( ) . node_id_to_type ( id ) ; let output_type = ccx . tcx ( ) . erase_late_bound_regions ( & fn_ty . fn_ret ( ) ) ; let abi = fn_ty . fn_abi ( ) ; trans_closure ( ccx , decl , body , llfndecl , param_substs , id , attrs , output_type , abi , closure :: ClosureEnv :: NotClosure ) ; }
Creates an LLVM function corresponding to a source language function.
Creates an LLVM function corresponding to a source language function .
ccx
&CrateContext<'a, 'tcx>
decl
&hir::FnDecl
body
&hir::Block
llfndecl
ValueRef
param_substs
&'tcx Substs<'tcx>
id
ast::NodeId
attrs
&[hir::Attribute]