use a different filename for original and promoted MIRs
This commit is contained in:
parent
a479a6a7a6
commit
63cdd7ab50
@ -61,8 +61,13 @@ pub fn dump_mir<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
||||
return;
|
||||
}
|
||||
|
||||
let file_name = format!("rustc.node{}.{}.{}.mir",
|
||||
node_id, pass_name, disambiguator);
|
||||
let promotion_id = match src {
|
||||
MirSource::Promoted(_, id) => format!("-promoted{}", id),
|
||||
_ => String::new()
|
||||
};
|
||||
|
||||
let file_name = format!("rustc.node{}{}.{}.{}.mir",
|
||||
node_id, promotion_id, pass_name, disambiguator);
|
||||
let _ = fs::File::create(&file_name).and_then(|mut file| {
|
||||
try!(writeln!(file, "// MIR for `{}`", node_path));
|
||||
try!(writeln!(file, "// node_id = {}", node_id));
|
||||
|
Loading…
x
Reference in New Issue
Block a user