Skip to content

Commit a7e3513

Browse files
committed
AST: Use SubstitutionMap::getReplacementTypesBuffer() instead of getReplacementTypes() in a couple of places
1 parent b9d0a49 commit a7e3513

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/AST/SubstitutionMap.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,23 +108,23 @@ bool SubstitutionMap::hasAnySubstitutableParams() const {
108108
}
109109

110110
bool SubstitutionMap::hasArchetypes() const {
111-
for (Type replacementTy : getReplacementTypes()) {
111+
for (Type replacementTy : getReplacementTypesBuffer()) {
112112
if (replacementTy && replacementTy->hasArchetype())
113113
return true;
114114
}
115115
return false;
116116
}
117117

118118
bool SubstitutionMap::hasOpenedExistential() const {
119-
for (Type replacementTy : getReplacementTypes()) {
119+
for (Type replacementTy : getReplacementTypesBuffer()) {
120120
if (replacementTy && replacementTy->hasOpenedExistential())
121121
return true;
122122
}
123123
return false;
124124
}
125125

126126
bool SubstitutionMap::hasDynamicSelf() const {
127-
for (Type replacementTy : getReplacementTypes()) {
127+
for (Type replacementTy : getReplacementTypesBuffer()) {
128128
if (replacementTy && replacementTy->hasDynamicSelfType())
129129
return true;
130130
}
@@ -136,7 +136,7 @@ bool SubstitutionMap::isCanonical() const {
136136

137137
if (!getGenericSignature()->isCanonical()) return false;
138138

139-
for (Type replacementTy : getReplacementTypes()) {
139+
for (Type replacementTy : getReplacementTypesBuffer()) {
140140
if (replacementTy && !replacementTy->isCanonical())
141141
return false;
142142
}
@@ -154,7 +154,7 @@ SubstitutionMap SubstitutionMap::getCanonical() const {
154154

155155
auto canonicalSig = getGenericSignature()->getCanonicalSignature();
156156
SmallVector<Type, 4> replacementTypes;
157-
for (Type replacementType : getReplacementTypes()) {
157+
for (Type replacementType : getReplacementTypesBuffer()) {
158158
if (replacementType)
159159
replacementTypes.push_back(replacementType->getCanonicalType());
160160
else

0 commit comments

Comments
 (0)