rustc_mir: buffer -Zdump-mir output instead of pestering the kernel constantly.
This commit is contained in:
parent
61dced1827
commit
1e7faef220
1 changed files with 2 additions and 2 deletions
|
@ -227,12 +227,12 @@ pub(crate) fn create_dump_file(
|
|||
pass_name: &str,
|
||||
disambiguator: &dyn Display,
|
||||
source: MirSource<'tcx>,
|
||||
) -> io::Result<fs::File> {
|
||||
) -> io::Result<io::BufWriter<fs::File>> {
|
||||
let file_path = dump_path(tcx, extension, pass_num, pass_name, disambiguator, source);
|
||||
if let Some(parent) = file_path.parent() {
|
||||
fs::create_dir_all(parent)?;
|
||||
}
|
||||
fs::File::create(&file_path)
|
||||
Ok(io::BufWriter::new(fs::File::create(&file_path)?))
|
||||
}
|
||||
|
||||
/// Write out a human-readable textual representation for the given MIR.
|
||||
|
|
Loading…
Reference in a new issue