@@ -577,7 +577,8 @@ pub fn trans_rust_fn_with_foreign_abi(ccx: &CrateContext,
577577 llwrapfn : ValueRef ,
578578 param_substs : & param_substs ,
579579 id : ast:: NodeId ,
580- hash : Option < & str > ) {
580+ hash : Option < & str > ,
581+ handle_items : HandleItemsFlag ) {
581582 let _icx = push_ctxt ( "foreign::build_foreign_fn" ) ;
582583
583584 let fnty = ty:: node_id_to_type ( ccx. tcx ( ) , id) ;
@@ -586,7 +587,8 @@ pub fn trans_rust_fn_with_foreign_abi(ccx: &CrateContext,
586587
587588 unsafe { // unsafe because we call LLVM operations
588589 // Build up the Rust function (`foo0` above).
589- let llrustfn = build_rust_fn ( ccx, decl, body, param_substs, attrs, id, hash) ;
590+ let llrustfn = build_rust_fn ( ccx, decl, body, param_substs, attrs, id,
591+ hash, handle_items) ;
590592
591593 // Build up the foreign wrapper (`foo` above).
592594 return build_wrap_fn ( ccx, llrustfn, llwrapfn, & tys, mty) ;
@@ -598,7 +600,8 @@ pub fn trans_rust_fn_with_foreign_abi(ccx: &CrateContext,
598600 param_substs : & param_substs ,
599601 attrs : & [ ast:: Attribute ] ,
600602 id : ast:: NodeId ,
601- hash : Option < & str > )
603+ hash : Option < & str > ,
604+ handle_items : HandleItemsFlag )
602605 -> ValueRef {
603606 let _icx = push_ctxt ( "foreign::foreign::build_rust_fn" ) ;
604607 let tcx = ccx. tcx ( ) ;
@@ -630,7 +633,7 @@ pub fn trans_rust_fn_with_foreign_abi(ccx: &CrateContext,
630633
631634 let llfn = base:: decl_internal_rust_fn ( ccx, t, ps. as_slice ( ) ) ;
632635 base:: set_llvm_fn_attrs ( attrs, llfn) ;
633- base:: trans_fn ( ccx, decl, body, llfn, param_substs, id, [ ] , TranslateItems ) ;
636+ base:: trans_fn ( ccx, decl, body, llfn, param_substs, id, [ ] , handle_items ) ;
634637 llfn
635638 }
636639
0 commit comments