mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-06 07:24:42 +01:00
Import symbolic vtable entries as attached constants (#5871)
Similar to 26ec78ec00 - vtable entries
can't be unattached symbolic constants, because if they are they can't
be `GetValueInSpecific`d because they lack the context for their
generic/specific.
Importing mostly wants to make/import things as unattached constants -
but `ImportRef` supports attached constants, so use those - but we don't
need the laziness, so use `LoadedImportRef`.
This commit is contained in:
@@ -187,6 +187,7 @@ static auto BuildVtable(Context& context, Parse::ClassDefinitionId node_id,
|
||||
// TODO: Avoid quadratic search. Perhaps build a map from `NameId` to the
|
||||
// elements of the top of `vtable_stack`.
|
||||
for (auto base_vtable_entry_id : base_vtable_inst_block) {
|
||||
LoadImportRef(context, base_vtable_entry_id);
|
||||
auto [derived_vtable_entry_id, derived_vtable_entry_const_id, fn_id,
|
||||
specific_id] =
|
||||
DecomposeVirtualFunction(context.sem_ir(), base_vtable_entry_id,
|
||||
|
||||
Reference in New Issue
Block a user