Use a QueryContext for try_mark_green.

This commit is contained in:
Camille GILLOT 2021-01-18 23:53:42 +01:00
parent 3bd14c7bbe
commit b27266fdb2
10 changed files with 133 additions and 143 deletions

View file

@ -867,7 +867,7 @@ fn determine_cgu_reuse<'tcx>(tcx: TyCtxt<'tcx>, cgu: &CodegenUnit<'tcx>) -> CguR
cgu.name()
);
if tcx.dep_graph.try_mark_green(tcx, &dep_node).is_some() {
if tcx.try_mark_green(&dep_node) {
// We can re-use either the pre- or the post-thinlto state. If no LTO is
// being performed then we can use post-LTO artifacts, otherwise we must
// reuse pre-LTO artifacts