Skip to content

Commit 83af140

Browse files
committed
Make the mir_map available to the after_analysis CompileController step.
1 parent 098ea17 commit 83af140

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/librustc_driver/driver.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ pub fn compile_input(sess: Session,
150150
&expanded_crate,
151151
tcx.map.krate(),
152152
&analysis,
153+
&mir_map,
153154
tcx,
154155
&lcx,
155156
&id);
@@ -275,6 +276,7 @@ pub struct CompileState<'a, 'ast: 'a, 'tcx: 'a> {
275276
pub expanded_crate: Option<&'a ast::Crate>,
276277
pub hir_crate: Option<&'a hir::Crate>,
277278
pub ast_map: Option<&'a hir_map::Map<'ast>>,
279+
pub mir_map: Option<&'a MirMap<'tcx>>,
278280
pub analysis: Option<&'a ty::CrateAnalysis<'a>>,
279281
pub tcx: Option<&'a ty::ctxt<'tcx>>,
280282
pub lcx: Option<&'a LoweringContext<'a>>,
@@ -298,6 +300,7 @@ impl<'a, 'ast, 'tcx> CompileState<'a, 'ast, 'tcx> {
298300
hir_crate: None,
299301
ast_map: None,
300302
analysis: None,
303+
mir_map: None,
301304
tcx: None,
302305
lcx: None,
303306
trans: None,
@@ -350,12 +353,14 @@ impl<'a, 'ast, 'tcx> CompileState<'a, 'ast, 'tcx> {
350353
krate: &'a ast::Crate,
351354
hir_crate: &'a hir::Crate,
352355
analysis: &'a ty::CrateAnalysis,
356+
mir_map: &'a MirMap<'tcx>,
353357
tcx: &'a ty::ctxt<'tcx>,
354358
lcx: &'a LoweringContext<'a>,
355359
crate_name: &'a str)
356360
-> CompileState<'a, 'ast, 'tcx> {
357361
CompileState {
358362
analysis: Some(analysis),
363+
mir_map: Some(mir_map),
359364
tcx: Some(tcx),
360365
krate: Some(krate),
361366
hir_crate: Some(hir_crate),

0 commit comments

Comments
 (0)