use codegen_instance_attrs where an instance is (easily) available

This commit is contained in:
Folkert de Vries
2025-07-02 11:12:54 +02:00
parent ec0ff720d1
commit 9c8ab89187
18 changed files with 43 additions and 26 deletions

View File

@@ -180,7 +180,7 @@ fn compute_symbol_name<'tcx>(
// FIXME(eddyb) Precompute a custom symbol name based on attributes.
let attrs = if tcx.def_kind(def_id).has_codegen_attrs() {
tcx.codegen_fn_attrs(def_id)
&tcx.codegen_instance_attrs(instance.def)
} else {
CodegenFnAttrs::EMPTY
};