Skip to content

Commit e8eba29

Browse files
committed
[IDE] Scrub SwiftIDE of References to getInput()
1 parent b52ef8b commit e8eba29

File tree

6 files changed

+96
-173
lines changed

6 files changed

+96
-173
lines changed

include/swift/AST/Types.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2890,6 +2890,10 @@ class AnyFunctionType : public TypeBase {
28902890
/// replaced.
28912891
AnyFunctionType *withExtInfo(ExtInfo info) const;
28922892

2893+
void printParams(raw_ostream &OS,
2894+
const PrintOptions &PO = PrintOptions()) const;
2895+
void printParams(ASTPrinter &Printer, const PrintOptions &PO) const;
2896+
28932897
// Implement isa/cast/dyncast/etc.
28942898
static bool classof(const TypeBase *T) {
28952899
return T->getKind() >= TypeKind::First_AnyFunctionType &&

lib/AST/ASTPrinter.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3898,6 +3898,17 @@ void Type::print(ASTPrinter &Printer, const PrintOptions &PO) const {
38983898
TypePrinter(Printer, PO).visit(*this);
38993899
}
39003900

3901+
void AnyFunctionType::printParams(raw_ostream &OS, const
3902+
PrintOptions &PO) const {
3903+
StreamPrinter Printer(OS);
3904+
printParams(Printer, PO);
3905+
}
3906+
void AnyFunctionType::printParams(ASTPrinter &Printer,
3907+
const PrintOptions &PO) const {
3908+
TypePrinter(Printer, PO).visitAnyFunctionTypeParams(getParams(),
3909+
/*printLabels*/true);
3910+
}
3911+
39013912
void LayoutConstraintInfo::print(raw_ostream &OS,
39023913
const PrintOptions &PO) const {
39033914
StreamPrinter Printer(OS);

lib/AST/ASTVerifier.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1576,7 +1576,7 @@ class Verifier : public ASTWalker {
15761576
"\nArgument type: ";
15771577
E->getArg()->getType().print(Out);
15781578
Out << "\nParameter type: ";
1579-
FT->getInput()->print(Out);
1579+
FT->printParams(Out);
15801580
Out << "\n";
15811581
E->dump(Out);
15821582
abort();

lib/AST/Decl.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4525,7 +4525,6 @@ Type ParamDecl::getVarargBaseTy(Type VarArgT) {
45254525
// It's the stdlib Array<T>.
45264526
return BGT->getGenericArgs()[0];
45274527
}
4528-
assert(T->hasError());
45294528
return T;
45304529
}
45314530

0 commit comments

Comments
 (0)