diff --git a/toolchain/sem_ir/name_scope.cpp b/toolchain/sem_ir/name_scope.cpp index b55d143861ebe..c5be24fd55f12 100644 --- a/toolchain/sem_ir/name_scope.cpp +++ b/toolchain/sem_ir/name_scope.cpp @@ -50,7 +50,7 @@ auto NameScope::AddRequired(Entry name_entry) -> void { } } -auto NameScope::LookupOrAdd(SemIR::NameId name_id, InstId inst_id, +auto NameScope::LookupOrAdd(NameId name_id, InstId inst_id, AccessKind access_kind) -> std::pair { auto insert_result = name_map_.Insert(name_id, EntryId(names_.size())); diff --git a/toolchain/sem_ir/name_scope.h b/toolchain/sem_ir/name_scope.h index 063b4a1bcad7a..e8e559414e339 100644 --- a/toolchain/sem_ir/name_scope.h +++ b/toolchain/sem_ir/name_scope.h @@ -71,8 +71,8 @@ class NameScope : public Printable { // using inst_id and access_kind and returns false with the new EntryId. // // This cannot be used to add poisoned entries; use LookupOrPoison instead. - auto LookupOrAdd(SemIR::NameId name_id, InstId inst_id, - AccessKind access_kind) -> std::pair; + auto LookupOrAdd(NameId name_id, InstId inst_id, AccessKind access_kind) + -> std::pair; // Searches for the given name. If found, including if a poisoned entry is // found, returns the corresponding EntryId. Otherwise, returns nullopt and @@ -83,7 +83,7 @@ class NameScope : public Printable { return extended_scopes_; } - auto AddExtendedScope(SemIR::InstId extended_scope) -> void { + auto AddExtendedScope(InstId extended_scope) -> void { extended_scopes_.push_back(extended_scope); } @@ -111,13 +111,12 @@ class NameScope : public Printable { } auto import_ir_scopes() const - -> llvm::ArrayRef> { + -> llvm::ArrayRef> { return import_ir_scopes_; } auto AddImportIRScope( - const std::pair& import_ir_scope) - -> void { + const std::pair& import_ir_scope) -> void { import_ir_scopes_.push_back(import_ir_scope); } @@ -168,8 +167,7 @@ class NameScope : public Printable { // Imported IR scopes that compose this namespace. This will be empty for // scopes that correspond to the current package. - llvm::SmallVector, 0> - import_ir_scopes_; + llvm::SmallVector, 0> import_ir_scopes_; }; // Provides a ValueStore wrapper for an API specific to name scopes. @@ -211,7 +209,7 @@ class NameScopeStore { return false; } // A package is either the current package or an imported package. - return scope_id == SemIR::NameScopeId::Package || + return scope_id == NameScopeId::Package || Get(scope_id).is_imported_package(); }