pub fn dump_mir_to_writer<'tcx, F>(
tcx: TyCtxt<'tcx>,
pass_name: &str,
disambiguator: &dyn Display,
body: &Body<'tcx>,
w: &mut dyn Write,
extra_data: F,
options: PrettyPrintMirOptions,
) -> Result<()>
Expand description
Most use-cases of dumping MIR should use the dump_mir entrypoint instead, which will also check if dumping MIR is enabled, and if this body matches the filters passed on the CLI.
That being said, if the above requirements have been validated already, this function is where most of the MIR dumping occurs, if one needs to export it to a file they have created with create_dump_file, rather than to a new file created as part of dump_mir, or to stdout/stderr for debugging purposes.