From 1a6323313b7b33afe7aafa93a689e43a2c4ac768 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Tue, 23 Aug 2022 16:06:01 +0000 Subject: [PATCH] Use correct CguReuse variant --- src/driver/aot.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/driver/aot.rs b/src/driver/aot.rs index 224756bc6c71..b8b325be71bc 100644 --- a/src/driver/aot.rs +++ b/src/driver/aot.rs @@ -373,10 +373,10 @@ pub(crate) fn run_aot( ) .0 } - CguReuse::PreLto => { + CguReuse::PreLto => unreachable!(), + CguReuse::PostLto => { OngoingModuleCodegen::Sync(reuse_workproduct_for_cgu(tcx, &*cgu)) } - CguReuse::PostLto => unreachable!(), } }) .collect::>() @@ -485,5 +485,5 @@ fn determine_cgu_reuse<'tcx>(tcx: TyCtxt<'tcx>, cgu: &CodegenUnit<'tcx>) -> CguR cgu.name() ); - if tcx.try_mark_green(&dep_node) { CguReuse::PreLto } else { CguReuse::No } + if tcx.try_mark_green(&dep_node) { CguReuse::PostLto } else { CguReuse::No } }