mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-06 07:34:45 +01:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user