mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 22:02:23 +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:
@@ -5,6 +5,7 @@
|
||||
#include "toolchain/check/context.h"
|
||||
#include "toolchain/check/convert.h"
|
||||
#include "toolchain/check/handle.h"
|
||||
#include "toolchain/check/type.h"
|
||||
#include "toolchain/parse/node_kind.h"
|
||||
|
||||
namespace Carbon::Check {
|
||||
@@ -51,7 +52,7 @@ auto HandleParseNode(Context& context, Parse::ArrayExprId node_id) -> bool {
|
||||
|
||||
bound_inst_id = ConvertToValueOfType(
|
||||
context, context.insts().GetLocId(bound_inst_id), bound_inst_id,
|
||||
context.GetSingletonType(SemIR::IntLiteralType::SingletonInstId));
|
||||
GetSingletonType(context, SemIR::IntLiteralType::SingletonInstId));
|
||||
context.AddInstAndPush<SemIR::ArrayType>(
|
||||
node_id, {.type_id = SemIR::TypeType::SingletonTypeId,
|
||||
.bound_id = bound_inst_id,
|
||||
|
||||
Reference in New Issue
Block a user