about summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift/src
diff options
context:
space:
mode:
authorRémy Rakic <remy.rakic+github@gmail.com>2024-08-28 13:54:32 +0000
committerRémy Rakic <remy.rakic+github@gmail.com>2024-08-30 07:07:28 +0000
commitc646b46b5299a58e7a0d475f0972f460d46cf68a (patch)
treeb7389b72072ba676a867353a5e4f4ea8b6843832 /compiler/rustc_codegen_cranelift/src
parent0d634185dfddefe09047881175f35c65d68dcff1 (diff)
downloadrust-c646b46b5299a58e7a0d475f0972f460d46cf68a.tar.gz
rust-c646b46b5299a58e7a0d475f0972f460d46cf68a.zip
introduce `PrettyPrintMirOptions` for cosmetic MIR dump options
initially starting with `-Z mir-include-spans` because we want them in
the NLL mir dump pass
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src')
-rw-r--r--compiler/rustc_codegen_cranelift/src/base.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/base.rs b/compiler/rustc_codegen_cranelift/src/base.rs
index f1d885bf1bc..4af4b39cc5b 100644
--- a/compiler/rustc_codegen_cranelift/src/base.rs
+++ b/compiler/rustc_codegen_cranelift/src/base.rs
@@ -44,8 +44,9 @@ pub(crate) fn codegen_fn<'tcx>(
     let _mir_guard = crate::PrintOnPanic(|| {
         let mut buf = Vec::new();
         with_no_trimmed_paths!({
-            rustc_middle::mir::pretty::write_mir_fn(tcx, mir, &mut |_, _| Ok(()), &mut buf)
-                .unwrap();
+            use rustc_middle::mir::pretty;
+            let options = pretty::PrettyPrintMirOptions::from_cli(tcx);
+            pretty::write_mir_fn(tcx, mir, &mut |_, _| Ok(()), &mut buf, options).unwrap();
         });
         String::from_utf8_lossy(&buf).into_owned()
     });