mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-30 13:05:01 +01:00
Move type functions off Context (#4951)
This creates a new check/type.h for most logic, and also moves some functions to TypeStore in sem_ir/type.h. My approach for TypeStore is to focus on moving the read-only functions there.
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
#include "toolchain/check/context.h"
|
||||
#include "toolchain/check/diagnostic_helpers.h"
|
||||
#include "toolchain/check/import.h"
|
||||
#include "toolchain/check/type.h"
|
||||
#include "toolchain/diagnostics/diagnostic.h"
|
||||
#include "toolchain/diagnostics/format_providers.h"
|
||||
#include "toolchain/sem_ir/name_scope.h"
|
||||
@@ -99,7 +100,7 @@ static auto AddNamespace(Context& context, PackageNameId cpp_package_id,
|
||||
|
||||
return AddImportNamespace(
|
||||
context,
|
||||
context.GetSingletonType(SemIR::NamespaceType::SingletonInstId),
|
||||
GetSingletonType(context, SemIR::NamespaceType::SingletonInstId),
|
||||
SemIR::NameId::ForPackageName(cpp_package_id),
|
||||
SemIR::NameScopeId::Package,
|
||||
/*diagnose_duplicate_namespace=*/false,
|
||||
|
||||
Reference in New Issue
Block a user