diff options
Diffstat (limited to 'gcc/rust/rust-session-manager.cc')
-rw-r--r-- | gcc/rust/rust-session-manager.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/rust/rust-session-manager.cc b/gcc/rust/rust-session-manager.cc index 8e69fc3..1d95291 100644 --- a/gcc/rust/rust-session-manager.cc +++ b/gcc/rust/rust-session-manager.cc @@ -583,9 +583,11 @@ void Session::compile_crate(const char *filename) { if (last_step == CompileOptions::CompileStep::BorrowCheck) return; - const bool dump_bir = - options.dump_option_enabled(CompileOptions::DumpOption::BIR_DUMP); - HIR::BorrowChecker(dump_bir).go(hir); + if (flag_borrowcheck) { + const bool dump_bir = + options.dump_option_enabled(CompileOptions::DumpOption::BIR_DUMP); + HIR::BorrowChecker(dump_bir).go(hir); + } if (saw_errors()) return; |