Rollup merge of #22910 - dotdash:time_llvm_passes, r=cmr

The timing code break when using multiple codegen units, but that
shouldn't stop us from using it with a single codegen unit.
This commit is contained in:
Manish Goregaokar 2015-03-01 09:50:30 +05:30
commit 60f7732ccd

View File

@ -851,7 +851,9 @@ pub fn run_passes(sess: &Session,
// FIXME: time_llvm_passes support - does this use a global context or
// something?
//if sess.time_llvm_passes() { llvm::LLVMRustPrintPassTimings(); }
if sess.opts.cg.codegen_units == 1 && sess.time_llvm_passes() {
unsafe { llvm::LLVMRustPrintPassTimings(); }
}
}
struct WorkItem {