@@ -75,7 +75,6 @@ use debuginfo::{self, DebugLoc, ToDebugLoc};
75
75
use declare;
76
76
use expr;
77
77
use glue;
78
- use inline;
79
78
use machine;
80
79
use machine:: { llalign_of_min, llsize_of, llsize_of_real} ;
81
80
use meth;
@@ -1407,19 +1406,17 @@ impl<'blk, 'tcx> FunctionContext<'blk, 'tcx> {
1407
1406
pub fn new ( ccx : & ' blk CrateContext < ' blk , ' tcx > ,
1408
1407
llfndecl : ValueRef ,
1409
1408
fn_ty : FnType ,
1410
- definition : Option < ( Instance < ' tcx > , & ty:: FnSig < ' tcx > , Abi ) > ,
1409
+ definition : Option < ( Instance < ' tcx > , & ty:: FnSig < ' tcx > , Abi , ast :: NodeId ) > ,
1411
1410
block_arena : & ' blk TypedArena < common:: BlockS < ' blk , ' tcx > > )
1412
1411
-> 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 ) ) => {
1415
1414
common:: validate_substs ( instance. substs ) ;
1416
- ( instance. substs , Some ( instance. def ) )
1415
+ ( instance. substs , Some ( instance. def ) , Some ( inlined_id ) )
1417
1416
}
1418
- None => ( ccx. tcx ( ) . mk_substs ( Substs :: empty ( ) ) , None )
1417
+ None => ( ccx. tcx ( ) . mk_substs ( Substs :: empty ( ) ) , None , None )
1419
1418
} ;
1420
1419
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) ) ;
1423
1420
let local_id = def_id. and_then ( |id| ccx. tcx ( ) . map . as_local_node_id ( id) ) ;
1424
1421
1425
1422
debug ! ( "FunctionContext::new({})" ,
@@ -1454,7 +1451,7 @@ impl<'blk, 'tcx> FunctionContext<'blk, 'tcx> {
1454
1451
} ;
1455
1452
1456
1453
let debug_context = if let ( false , Some ( definition) ) = ( no_debug, definition) {
1457
- let ( instance, sig, abi) = definition;
1454
+ let ( instance, sig, abi, _ ) = definition;
1458
1455
debuginfo:: create_function_debug_context ( ccx, instance, sig, abi, llfndecl)
1459
1456
} else {
1460
1457
debuginfo:: empty_function_debug_context ( ccx)
@@ -1850,7 +1847,11 @@ pub fn trans_closure<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>,
1850
1847
1851
1848
let ( arena, fcx) : ( TypedArena < _ > , FunctionContext ) ;
1852
1849
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) ;
1854
1855
1855
1856
if fcx. mir . is_some ( ) {
1856
1857
return mir:: trans_mir ( & fcx) ;
0 commit comments