Add -Zdump-mir-exclude-alloc-bytes
This commit is contained in:
parent
4bc39f028d
commit
31851d4770
3 changed files with 6 additions and 0 deletions
|
@ -683,6 +683,7 @@ fn test_unstable_options_tracking_hash() {
|
||||||
untracked!(dump_mir, Some(String::from("abc")));
|
untracked!(dump_mir, Some(String::from("abc")));
|
||||||
untracked!(dump_mir_dataflow, true);
|
untracked!(dump_mir_dataflow, true);
|
||||||
untracked!(dump_mir_dir, String::from("abc"));
|
untracked!(dump_mir_dir, String::from("abc"));
|
||||||
|
untracked!(dump_mir_exclude_alloc_bytes, true);
|
||||||
untracked!(dump_mir_exclude_pass_number, true);
|
untracked!(dump_mir_exclude_pass_number, true);
|
||||||
untracked!(dump_mir_graphviz, true);
|
untracked!(dump_mir_graphviz, true);
|
||||||
untracked!(dump_mono_stats, SwitchWithOptPath::Enabled(Some("mono-items-dir/".into())));
|
untracked!(dump_mono_stats, SwitchWithOptPath::Enabled(Some("mono-items-dir/".into())));
|
||||||
|
|
|
@ -1521,6 +1521,9 @@ impl<'a, 'tcx, Prov: Provenance, Extra, Bytes: AllocBytes> std::fmt::Display
|
||||||
// We are done.
|
// We are done.
|
||||||
return write!(w, " {{}}");
|
return write!(w, " {{}}");
|
||||||
}
|
}
|
||||||
|
if tcx.sess.opts.unstable_opts.dump_mir_exclude_alloc_bytes {
|
||||||
|
return write!(w, " {{ .. }}");
|
||||||
|
}
|
||||||
// Write allocation bytes.
|
// Write allocation bytes.
|
||||||
writeln!(w, " {{")?;
|
writeln!(w, " {{")?;
|
||||||
write_allocation_bytes(tcx, alloc, w, " ")?;
|
write_allocation_bytes(tcx, alloc, w, " ")?;
|
||||||
|
|
|
@ -1662,6 +1662,8 @@ options! {
|
||||||
(default: no)"),
|
(default: no)"),
|
||||||
dump_mir_dir: String = ("mir_dump".to_string(), parse_string, [UNTRACKED],
|
dump_mir_dir: String = ("mir_dump".to_string(), parse_string, [UNTRACKED],
|
||||||
"the directory the MIR is dumped into (default: `mir_dump`)"),
|
"the directory the MIR is dumped into (default: `mir_dump`)"),
|
||||||
|
dump_mir_exclude_alloc_bytes: bool = (false, parse_bool, [UNTRACKED],
|
||||||
|
"exclude the raw bytes of allocations when dumping MIR (used in tests) (default: no)"),
|
||||||
dump_mir_exclude_pass_number: bool = (false, parse_bool, [UNTRACKED],
|
dump_mir_exclude_pass_number: bool = (false, parse_bool, [UNTRACKED],
|
||||||
"exclude the pass number when dumping MIR (used in tests) (default: no)"),
|
"exclude the pass number when dumping MIR (used in tests) (default: no)"),
|
||||||
dump_mir_graphviz: bool = (false, parse_bool, [UNTRACKED],
|
dump_mir_graphviz: bool = (false, parse_bool, [UNTRACKED],
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue