Make the mir_map available to the after_analysis CompileController step.

This commit is contained in:
Scott Olson
2015-11-12 14:18:11 -06:00
parent 098ea17556
commit 83af140b40
+5
View File
@@ -150,6 +150,7 @@ macro_rules! controller_entry_point{($point: ident, $tsess: expr, $make_state: e
&expanded_crate,
tcx.map.krate(),
&analysis,
&mir_map,
tcx,
&lcx,
&id);
@@ -275,6 +276,7 @@ pub struct CompileState<'a, 'ast: 'a, 'tcx: 'a> {
pub expanded_crate: Option<&'a ast::Crate>,
pub hir_crate: Option<&'a hir::Crate>,
pub ast_map: Option<&'a hir_map::Map<'ast>>,
pub mir_map: Option<&'a MirMap<'tcx>>,
pub analysis: Option<&'a ty::CrateAnalysis<'a>>,
pub tcx: Option<&'a ty::ctxt<'tcx>>,
pub lcx: Option<&'a LoweringContext<'a>>,
@@ -298,6 +300,7 @@ fn empty(input: &'a Input,
hir_crate: None,
ast_map: None,
analysis: None,
mir_map: None,
tcx: None,
lcx: None,
trans: None,
@@ -350,12 +353,14 @@ fn state_after_analysis(input: &'a Input,
krate: &'a ast::Crate,
hir_crate: &'a hir::Crate,
analysis: &'a ty::CrateAnalysis,
mir_map: &'a MirMap<'tcx>,
tcx: &'a ty::ctxt<'tcx>,
lcx: &'a LoweringContext<'a>,
crate_name: &'a str)
-> CompileState<'a, 'ast, 'tcx> {
CompileState {
analysis: Some(analysis),
mir_map: Some(mir_map),
tcx: Some(tcx),
krate: Some(krate),
hir_crate: Some(hir_crate),