@@ -75,7 +75,6 @@ use debuginfo::{self, DebugLoc, ToDebugLoc};
7575use declare;
7676use expr;
7777use glue;
78- use inline;
7978use machine;
8079use machine:: { llalign_of_min, llsize_of, llsize_of_real} ;
8180use meth;
@@ -1407,19 +1406,17 @@ impl<'blk, 'tcx> FunctionContext<'blk, 'tcx> {
14071406 pub fn new ( ccx : & ' blk CrateContext < ' blk , ' tcx > ,
14081407 llfndecl : ValueRef ,
14091408 fn_ty : FnType ,
1410- definition : Option < ( Instance < ' tcx > , & ty:: FnSig < ' tcx > , Abi ) > ,
1409+ definition : Option < ( Instance < ' tcx > , & ty:: FnSig < ' tcx > , Abi , ast :: NodeId ) > ,
14111410 block_arena : & ' blk TypedArena < common:: BlockS < ' blk , ' tcx > > )
14121411 -> FunctionContext < ' blk , ' tcx > {
1413- let ( param_substs, def_id) = match definition {
1414- Some ( ( instance, _, _) ) => {
1412+ let ( param_substs, def_id, inlined_id ) = match definition {
1413+ Some ( ( instance, _, _, inlined_id ) ) => {
14151414 common:: validate_substs ( instance. substs ) ;
1416- ( instance. substs , Some ( instance. def ) )
1415+ ( instance. substs , Some ( instance. def ) , Some ( inlined_id ) )
14171416 }
1418- None => ( ccx. tcx ( ) . mk_substs ( Substs :: empty ( ) ) , None )
1417+ None => ( ccx. tcx ( ) . mk_substs ( Substs :: empty ( ) ) , None , None )
14191418 } ;
14201419
1421- let inlined_did = def_id. and_then ( |def_id| inline:: get_local_instance ( ccx, def_id) ) ;
1422- let inlined_id = inlined_did. and_then ( |id| ccx. tcx ( ) . map . as_local_node_id ( id) ) ;
14231420 let local_id = def_id. and_then ( |id| ccx. tcx ( ) . map . as_local_node_id ( id) ) ;
14241421
14251422 debug ! ( "FunctionContext::new({})" ,
@@ -1454,7 +1451,7 @@ impl<'blk, 'tcx> FunctionContext<'blk, 'tcx> {
14541451 } ;
14551452
14561453 let debug_context = if let ( false , Some ( definition) ) = ( no_debug, definition) {
1457- let ( instance, sig, abi) = definition;
1454+ let ( instance, sig, abi, _ ) = definition;
14581455 debuginfo:: create_function_debug_context ( ccx, instance, sig, abi, llfndecl)
14591456 } else {
14601457 debuginfo:: empty_function_debug_context ( ccx)
@@ -1850,7 +1847,11 @@ pub fn trans_closure<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>,
18501847
18511848 let ( arena, fcx) : ( TypedArena < _ > , FunctionContext ) ;
18521849 arena = TypedArena :: new ( ) ;
1853- fcx = FunctionContext :: new ( ccx, llfndecl, fn_ty, Some ( ( instance, sig, abi) ) , & arena) ;
1850+ fcx = FunctionContext :: new ( ccx,
1851+ llfndecl,
1852+ fn_ty,
1853+ Some ( ( instance, sig, abi, inlined_id) ) ,
1854+ & arena) ;
18541855
18551856 if fcx. mir . is_some ( ) {
18561857 return mir:: trans_mir ( & fcx) ;
0 commit comments