mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Support for importing const-qualified types from C++. (#5794)
Incidentally also supports import of pointers-to-pointers. Imported const-qualified types aren't especially useful just yet, because on the Carbon side we don't yet permit conversions from non-const to const types, so most of the tests still fail, but for different reasons now.
This commit is contained in:
@@ -105,6 +105,11 @@ auto GetAssociatedEntityType(Context& context, SemIR::InterfaceId interface_id,
|
||||
interface_specific_id);
|
||||
}
|
||||
|
||||
auto GetConstType(Context& context, SemIR::TypeInstId inner_type_id)
|
||||
-> SemIR::TypeId {
|
||||
return GetTypeImpl<SemIR::ConstType>(context, inner_type_id);
|
||||
}
|
||||
|
||||
auto GetSingletonType(Context& context, SemIR::TypeInstId singleton_id)
|
||||
-> SemIR::TypeId {
|
||||
CARBON_CHECK(SemIR::IsSingletonInstId(singleton_id));
|
||||
|
||||
Reference in New Issue
Block a user