SILGen: Substitute away opaque types.

This commit is contained in:
Joe Groff
2018-12-21 15:17:43 -08:00
parent f008019bda
commit c771a7e71b
21 changed files with 238 additions and 44 deletions

View File

@@ -106,8 +106,14 @@ public:
/// Apply a substitution to the conforming type.
ProtocolConformanceRef subst(Type origType,
TypeSubstitutionFn subs,
LookupConformanceFn conformances) const;
LookupConformanceFn conformances,
SubstOptions options = None) const;
/// Replace opaque types in the conforming type with their underlying types,
/// and resolve opaque conformances to their underlying conformances.
ProtocolConformanceRef substOpaqueTypesWithUnderlyingTypes(Type origType,
ResilienceExpansion expansion) const;
/// Given a dependent type (expressed in terms of this conformance's
/// protocol), follow it from the conforming type.
Type getAssociatedType(Type origType, Type dependentType,