Skip to content

Commit 3a6fa6b

Browse files
committed
TBDGen: Remove use of AbstractFunctionDecl::getParameterLists()
1 parent 183a1ae commit 3a6fa6b

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

lib/TBDGen/TBDGen.cpp

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -141,17 +141,10 @@ void TBDGenVisitor::visitAbstractFunctionDecl(AbstractFunctionDecl *AFD) {
141141
// functions) are public symbols, as the default values are computed at the
142142
// call site.
143143
auto index = 0;
144-
auto paramLists = AFD->getParameterLists();
145-
// Skip the first arguments, which contains Self (etc.), can't be defaulted,
146-
// and are ignored for the purposes of default argument indices.
147-
if (AFD->getDeclContext()->isTypeContext())
148-
paramLists = paramLists.slice(1);
149-
for (auto *paramList : paramLists) {
150-
for (auto *param : *paramList) {
151-
if (param->getDefaultValue())
152-
addSymbol(SILDeclRef::getDefaultArgGenerator(AFD, index));
153-
index++;
154-
}
144+
for (auto *param : *AFD->getParameters()) {
145+
if (param->getDefaultValue())
146+
addSymbol(SILDeclRef::getDefaultArgGenerator(AFD, index));
147+
index++;
155148
}
156149
}
157150

0 commit comments

Comments
 (0)