about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorbjorn3 <bjorn3@users.noreply.github.com>2020-10-10 16:20:42 +0200
committerbjorn3 <bjorn3@users.noreply.github.com>2020-10-10 16:20:42 +0200
commit12a294121422a223a8d0a6a9974efbe7577977e7 (patch)
tree01e35119f6daaa0fdb7fe7982bfd7a84966cda6d /compiler/rustc_codegen_llvm/src
parent69f26b776124d3ed9ea87fec1703e42100f3434c (diff)
downloadrust-12a294121422a223a8d0a6a9974efbe7577977e7.tar.gz
rust-12a294121422a223a8d0a6a9974efbe7577977e7.zip
Move llvm_util::time_trace_profiler_finish call to join_codegen
This makes it also run when compilation has failed, neither --emit exe
nor --emit metadata is passed, or -Zno-link is used.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
-rw-r--r--compiler/rustc_codegen_llvm/src/lib.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/rustc_codegen_llvm/src/lib.rs b/compiler/rustc_codegen_llvm/src/lib.rs
index b3ff0f9e700..02da175cac3 100644
--- a/compiler/rustc_codegen_llvm/src/lib.rs
+++ b/compiler/rustc_codegen_llvm/src/lib.rs
@@ -282,6 +282,12 @@ impl CodegenBackend for LlvmCodegenBackend {
             rustc_codegen_ssa::back::write::dump_incremental_data(&codegen_results);
         }
 
+        sess.time("llvm_dump_timing_file", || {
+            if sess.opts.debugging_opts.llvm_time_trace {
+                llvm_util::time_trace_profiler_finish("llvm_timings.json");
+            }
+        });
+
         Ok((codegen_results, work_products))
     }
 
@@ -307,12 +313,6 @@ impl CodegenBackend for LlvmCodegenBackend {
             );
         });
 
-        sess.time("llvm_dump_timing_file", || {
-            if sess.opts.debugging_opts.llvm_time_trace {
-                llvm_util::time_trace_profiler_finish("llvm_timings.json");
-            }
-        });
-
         Ok(())
     }
 }