1
Fork 0

only compute codegen_fn_attrs where needed

This commit is contained in:
lcnr 2022-05-04 11:18:37 +02:00
parent 66ff6c32e5
commit d371ebe117
11 changed files with 153 additions and 50 deletions

View file

@ -1007,7 +1007,9 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
record!(self.tables.def_span[def_id] <- tcx.def_span(def_id));
self.encode_attrs(def_id);
record!(self.tables.expn_that_defined[def_id] <- self.tcx.expn_that_defined(def_id));
record!(self.tables.codegen_fn_attrs[def_id] <- self.tcx.codegen_fn_attrs(def_id));
if tcx.has_codegen_attrs(def_kind) {
record!(self.tables.codegen_fn_attrs[def_id] <- self.tcx.codegen_fn_attrs(def_id));
}
if should_encode_visibility(def_kind) {
record!(self.tables.visibility[def_id] <- self.tcx.visibility(def_id));
}