1
Fork 0

Move vcall_visibility_metadata optimization hint out of a debuginfo generation method

This commit is contained in:
bjorn3 2024-03-30 12:01:57 +00:00
parent 5ced3dad57
commit e9ea578147
4 changed files with 25 additions and 7 deletions

View file

@ -133,6 +133,7 @@ pub fn get_vtable<'tcx, Cx: CodegenMethods<'tcx>>(
let align = cx.data_layout().pointer_align.abi;
let vtable = cx.static_addr_of(vtable_const, align, Some("vtable"));
cx.apply_vcall_visibility_metadata(ty, trait_ref, vtable);
cx.create_vtable_debuginfo(ty, trait_ref, vtable);
cx.vtables().borrow_mut().insert((ty, trait_ref), vtable);
vtable