Rename type's GetInstId to GetTypeInstId, reflecting returned type (#6708)

Discussed briefly [on
Discord](https://discord.com/channels/655572317891461132/655578254970716160/1470442830118912265),
done to reduce confusion.

Assisted-by: Google Antigravity with Gemini 3 Flash
This commit is contained in:
Jon Ross-Perkins
2026-02-09 22:00:21 +00:00
committed by GitHub
parent a465018fec
commit 2c6d9c7f66
41 changed files with 99 additions and 91 deletions
+3 -3
View File
@@ -76,7 +76,7 @@ template <const TypeInstId& BuiltinId>
struct BuiltinType {
static auto CheckType(const File& sem_ir, ValidateState& /*state*/,
TypeId type_id) -> bool {
return sem_ir.types().GetInstId(type_id) == BuiltinId;
return sem_ir.types().GetTypeInstId(type_id) == BuiltinId;
}
};
@@ -199,7 +199,7 @@ struct AnyType {
struct CoreStringType {
static auto CheckType(const File& sem_ir, ValidateState& /*state*/,
TypeId type_id) -> bool {
auto type_inst_id = sem_ir.types().GetInstId(type_id);
auto type_inst_id = sem_ir.types().GetTypeInstId(type_id);
auto class_type = sem_ir.insts().TryGetAs<ClassType>(type_inst_id);
if (!class_type) {
return false;
@@ -214,7 +214,7 @@ struct CoreStringType {
struct CoreCharType {
static auto CheckType(const File& sem_ir, ValidateState& /*state*/,
TypeId type_id) -> bool {
auto type_inst_id = sem_ir.types().GetInstId(type_id);
auto type_inst_id = sem_ir.types().GetTypeInstId(type_id);
auto class_type = sem_ir.insts().TryGetAs<ClassType>(type_inst_id);
if (!class_type) {
return false;