@@ -577,7 +577,8 @@ pub fn trans_rust_fn_with_foreign_abi(ccx: &CrateContext,
577
577
llwrapfn : ValueRef ,
578
578
param_substs : & param_substs ,
579
579
id : ast:: NodeId ,
580
- hash : Option < & str > ) {
580
+ hash : Option < & str > ,
581
+ handle_items : HandleItemsFlag ) {
581
582
let _icx = push_ctxt ( "foreign::build_foreign_fn" ) ;
582
583
583
584
let fnty = ty:: node_id_to_type ( ccx. tcx ( ) , id) ;
@@ -586,7 +587,8 @@ pub fn trans_rust_fn_with_foreign_abi(ccx: &CrateContext,
586
587
587
588
unsafe { // unsafe because we call LLVM operations
588
589
// 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) ;
590
592
591
593
// Build up the foreign wrapper (`foo` above).
592
594
return build_wrap_fn ( ccx, llrustfn, llwrapfn, & tys, mty) ;
@@ -598,7 +600,8 @@ pub fn trans_rust_fn_with_foreign_abi(ccx: &CrateContext,
598
600
param_substs : & param_substs ,
599
601
attrs : & [ ast:: Attribute ] ,
600
602
id : ast:: NodeId ,
601
- hash : Option < & str > )
603
+ hash : Option < & str > ,
604
+ handle_items : HandleItemsFlag )
602
605
-> ValueRef {
603
606
let _icx = push_ctxt ( "foreign::foreign::build_rust_fn" ) ;
604
607
let tcx = ccx. tcx ( ) ;
@@ -630,7 +633,7 @@ pub fn trans_rust_fn_with_foreign_abi(ccx: &CrateContext,
630
633
631
634
let llfn = base:: decl_internal_rust_fn ( ccx, t, ps. as_slice ( ) ) ;
632
635
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 ) ;
634
637
llfn
635
638
}
636
639
0 commit comments