1
Fork 0

add a Vtable kind of symbolic allocations

This commit is contained in:
Ralf Jung 2022-07-17 11:36:37 -04:00
parent a7468c60f8
commit da5e4d73f1
11 changed files with 106 additions and 15 deletions

View file

@ -1427,6 +1427,13 @@ fn collect_miri<'tcx>(tcx: TyCtxt<'tcx>, alloc_id: AllocId, output: &mut MonoIte
output.push(create_fn_mono_item(tcx, fn_instance, DUMMY_SP));
}
}
GlobalAlloc::Vtable(ty, trait_ref) => {
// FIXME(RJ) no ideas if this is correct. There is this nice
// `create_mono_items_for_vtable_methods` method but I wouldn't know how to call it from
// here. So instead we just generate the actual vtable and recurse.
let alloc_id = tcx.vtable_allocation((ty, trait_ref));
collect_miri(tcx, alloc_id, output)
}
}
}