Rollup merge of #76958 - est31:ns, r=oli-obk

Replace manual as_nanos and as_secs_f64 reimplementations
This commit is contained in:
Ralf Jung 2020-09-21 10:40:39 +02:00 committed by GitHub
commit 048866bd6b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 10 deletions

View file

@ -108,7 +108,7 @@ pub fn compile_codegen_unit(
// We assume that the cost to run LLVM on a CGU is proportional to
// the time we needed for codegenning it.
let cost = time_to_codegen.as_secs() * 1_000_000_000 + time_to_codegen.subsec_nanos() as u64;
let cost = time_to_codegen.as_nanos() as u64;
fn module_codegen(tcx: TyCtxt<'_>, cgu_name: Symbol) -> ModuleCodegen<ModuleLlvm> {
let cgu = tcx.codegen_unit(cgu_name);