mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Add -verify-all-substitution-maps frontend flag
This commit is contained in:
@@ -56,7 +56,12 @@ SubstitutionMap::SubstitutionMap(
|
||||
GenericSignature genericSig,
|
||||
ArrayRef<Type> replacementTypes,
|
||||
ArrayRef<ProtocolConformanceRef> conformances)
|
||||
: storage(Storage::get(genericSig, replacementTypes, conformances)) { }
|
||||
: storage(Storage::get(genericSig, replacementTypes, conformances)) {
|
||||
#ifndef NDEBUG
|
||||
if (genericSig->getASTContext().LangOpts.VerifyAllSubstitutionMaps)
|
||||
verify();
|
||||
#endif
|
||||
}
|
||||
|
||||
ArrayRef<Type> SubstitutionMap::getReplacementTypesBuffer() const {
|
||||
return storage ? storage->getReplacementTypes() : ArrayRef<Type>();
|
||||
@@ -476,7 +481,7 @@ SubstitutionMap SubstitutionMap::subst(TypeSubstitutionFn subs,
|
||||
newConformances.push_back(
|
||||
conformance.subst(substType, subs, conformances, options));
|
||||
}
|
||||
|
||||
|
||||
oldConformances = oldConformances.slice(1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user