mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 16:41:06 +01:00
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:
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user