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:
Jon Ross-Perkins authored and GitHub committed 2025-02-13 23:02:38 +00:00
1 parent 23e5677c8e
commit dc8f47e6ad
39 files changed
+506 -393

No files matched your search

+2 -1
View File
@@ -18,6 +18,7 @@
#include "toolchain/check/import_cpp.h"
#include "toolchain/check/import_ref.h"
#include "toolchain/check/node_id_traversal.h"
#include "toolchain/check/type.h"
namespace Carbon::Check {
@@ -92,7 +93,7 @@ auto CheckUnit::Run() -> void {
auto CheckUnit::InitPackageScopeAndImports() -> void {
// Importing makes many namespaces, so only canonicalize the type once.
auto namespace_type_id =
context_.GetSingletonType(SemIR::NamespaceType::SingletonInstId);
GetSingletonType(context_, SemIR::NamespaceType::SingletonInstId);
// Define the package scope, with an instruction for `package` expressions to
// reference.