mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 17:31:07 +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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user