On Fri, 2024-12-13 at 22:37 +0000, Ihor Solodrai wrote: Also a small nit. Aside from my previous email, I think this is a good simplification. [...] > @@ -3250,24 +3250,20 @@ static void cu__sort_types_by_offset(struct cu *cu, struct conf_load *conf) > cu__for_all_tags(cu, type__sort_by_offset, conf); > } > > -static int cu__finalize(struct cu *cu, struct cus *cus, struct conf_load *conf, void *thr_data) > +static void cu__finalize(struct cu *cu, struct cus *cus, struct conf_load *conf) > { > cu__for_all_tags(cu, class_member__cache_byte_size, conf); > > if (cu__language_reorders_offsets(cu)) > cu__sort_types_by_offset(cu, conf); > - > - cus__set_cu_state(cus, cu, CU__LOADED); > - > - if (conf && conf->steal) { > - return conf->steal(cu, conf, thr_data); > - } > - return LSK__KEEPIT; > } > > -static int cus__finalize(struct cus *cus, struct cu *cu, struct conf_load *conf, void *thr_data) > +static int cus__steal_now(struct cus *cus, struct cu *cu, struct conf_load *conf) > { > - int lsk = cu__finalize(cu, cus, conf, thr_data); > + if (!conf || !conf->steal) > + return 0; Nit: the function returns either 0 or an enum literal, but 0 is a valid literal value for that enum. This is a bit confusing. > + > + int lsk = conf->steal(cu, conf); > switch (lsk) { > case LSK__DELETE: > cus__remove(cus, cu); [...]