Switch File functions, classes, and types to ValueStores (#3316)

Building on #3313, start using ValueStore on File. Functions and classes
are straightforward. Types here I present as a borderline case where
maybe we want a more bespoke API, but maybe this is okay? Most other
things probably need a slightly different API, which although I might do
that for a consistent interface, felt more out-of-scope for this change.
This commit is contained in:
Jon Ross-Perkins authored and GitHub committed 2023-10-20 22:40:18 +00:00
1 parent 843dd40f22
commit 7e9d644e1f
14 files changed
+76 -126

No files matched your search

+1 -1
View File
@@ -145,7 +145,7 @@ auto DeclarationNameStack::UpdateScopeIfNeeded(NameContext& name_context)
context_->semantics_ir().GetNode(name_context.resolved_node_id);
switch (resolved_node.kind()) {
case SemIR::ClassDeclaration::Kind: {
auto& class_info = context_->semantics_ir().GetClass(
const auto& class_info = context_->semantics_ir().classes().Get(
resolved_node.As<SemIR::ClassDeclaration>().class_id);
// TODO: Check that the class is complete rather than that it has a scope.
if (class_info.scope_id.is_valid()) {