diff options
| author | Ralf Jung <post@ralfj.de> | 2022-07-17 11:36:37 -0400 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2022-07-20 16:57:31 -0400 |
| commit | da5e4d73f192b5c0faa357992e6b6c61707ae592 (patch) | |
| tree | 4f1672a1f13dc7ef0bd814b7b5d393d40ec32350 /compiler/rustc_monomorphize/src | |
| parent | a7468c60f8dbf5feb23ad840b174d7e57113a846 (diff) | |
add a Vtable kind of symbolic allocations
Diffstat (limited to 'compiler/rustc_monomorphize/src')
| -rw-r--r-- | compiler/rustc_monomorphize/src/collector.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/rustc_monomorphize/src/collector.rs b/compiler/rustc_monomorphize/src/collector.rs index e3cfb034e40..3cee9a460c1 100644 --- a/compiler/rustc_monomorphize/src/collector.rs +++ b/compiler/rustc_monomorphize/src/collector.rs @@ -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) + } } } |
