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

@@ -344,7 +344,7 @@ pub(crate) fn llfn_attrs_from_instance<'ll, 'tcx>(
llfn: &'ll Value,
instance: ty::Instance<'tcx>,
) {
let codegen_fn_attrs = cx.tcx.codegen_fn_attrs(instance.def_id());
let codegen_fn_attrs = cx.tcx.codegen_instance_attrs(instance.def);
let mut to_add = SmallVec::<[_; 16]>::new();