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
@@ -8,6 +8,7 @@
#include "toolchain/check/handle.h"
#include "toolchain/check/operator.h"
#include "toolchain/check/pointer_dereference.h"
#include "toolchain/check/type.h"
#include "toolchain/diagnostics/diagnostic_emitter.h"
namespace Carbon::Check {
@@ -244,7 +245,7 @@ auto HandleParseNode(Context& context, Parse::PrefixOperatorAmpId node_id)
break;
}
context.AddInstAndPush<SemIR::AddrOf>(
node_id, SemIR::AddrOf{.type_id = context.GetPointerType(type_id),
node_id, SemIR::AddrOf{.type_id = GetPointerType(context, type_id),
.lvalue_id = value_id});
return true;
}