Assign a constant to ClassDecl/InterfaceDecl for name references. (#3722)

By adding a constant to ClassDecl/InterfaceDecl, we're able to remove
name reference special-casing. Use TryEvalInst on the Decl to generate
the Type. For ClassDecl, then use the generated constant for
self_type_id.
This commit is contained in:
Jon Ross-Perkins
2024-02-24 00:00:18 +00:00
committed by GitHub
parent 8e8eeb3243
commit 364ea5d3f2
109 changed files with 420 additions and 429 deletions
-4
View File
@@ -1015,10 +1015,6 @@ auto Context::GetBuiltinType(SemIR::BuiltinKind kind) -> SemIR::TypeId {
return type_id;
}
auto Context::GetClassType(SemIR::ClassId class_id) -> SemIR::TypeId {
return GetTypeImpl<SemIR::ClassType>(*this, class_id);
}
auto Context::GetPointerType(SemIR::TypeId pointee_type_id) -> SemIR::TypeId {
return GetTypeImpl<SemIR::PointerType>(*this, pointee_type_id);
}