about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorJohn Kåre Alsaker <john.kare.alsaker@gmail.com>2023-02-06 08:31:19 +0100
committerJohn Kåre Alsaker <john.kare.alsaker@gmail.com>2023-03-21 18:18:25 +0100
commitb0dc15c61ba38ad86aa9d565f99189db4a91f4c4 (patch)
tree28cc0ef0c36be147403607b9109072fb25b3d977 /compiler/rustc_codegen_llvm/src
parent66676820eb801473f21006fa64315ce3c42402eb (diff)
downloadrust-b0dc15c61ba38ad86aa9d565f99189db4a91f4c4.tar.gz
rust-b0dc15c61ba38ad86aa9d565f99189db4a91f4c4.zip
Reduce output spam
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
-rw-r--r--compiler/rustc_codegen_llvm/src/lib.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_codegen_llvm/src/lib.rs b/compiler/rustc_codegen_llvm/src/lib.rs
index 8dafe1b750b..e5bae009ed6 100644
--- a/compiler/rustc_codegen_llvm/src/lib.rs
+++ b/compiler/rustc_codegen_llvm/src/lib.rs
@@ -361,12 +361,12 @@ impl CodegenBackend for LlvmCodegenBackend {
             .expect("Expected LlvmCodegenBackend's OngoingCodegen, found Box<Any>")
             .join(sess);
 
-        sess.time("llvm_dump_timing_file", || {
-            if sess.opts.unstable_opts.llvm_time_trace {
+        if sess.opts.unstable_opts.llvm_time_trace {
+            sess.time("llvm_dump_timing_file", || {
                 let file_name = outputs.with_extension("llvm_timings.json");
                 llvm_util::time_trace_profiler_finish(&file_name);
-            }
-        });
+            });
+        }
 
         Ok((codegen_results, work_products))
     }