Skip to content
Permalink
Browse files

rustc_mir: buffer -Zdump-mir output instead of pestering the kernel c…

…onstantly.
  • Loading branch information...
eddyb committed Sep 10, 2019
1 parent 61dced1 commit 1e7faef2204f02d79506559d298f61dc3dcd24b3
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/librustc_mir/util/pretty.rs
@@ -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.

0 comments on commit 1e7faef

Please sign in to comment.
You can’t perform that action at this time.