Skip to content

Commit a7c9bd0

Browse files
authored
Merge pull request #17181 from CodaFi/in-put-up-and-in-shut-up
[IDE] Scrub SwiftIDE of References to getInput()
2 parents 27b4501 + e8eba29 commit a7c9bd0

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
@@ -3901,6 +3901,17 @@ void Type::print(ASTPrinter &Printer, const PrintOptions &PO) const {
39013901
TypePrinter(Printer, PO).visit(*this);
39023902
}
39033903

3904+
void AnyFunctionType::printParams(raw_ostream &OS, const
3905+
PrintOptions &PO) const {
3906+
StreamPrinter Printer(OS);
3907+
printParams(Printer, PO);
3908+
}
3909+
void AnyFunctionType::printParams(ASTPrinter &Printer,
3910+
const PrintOptions &PO) const {
3911+
TypePrinter(Printer, PO).visitAnyFunctionTypeParams(getParams(),
3912+
/*printLabels*/true);
3913+
}
3914+
39043915
void LayoutConstraintInfo::print(raw_ostream &OS,
39053916
const PrintOptions &PO) const {
39063917
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
@@ -4547,7 +4547,6 @@ Type ParamDecl::getVarargBaseTy(Type VarArgT) {
45474547
// It's the stdlib Array<T>.
45484548
return BGT->getGenericArgs()[0];
45494549
}
4550-
assert(T->hasError());
45514550
return T;
45524551
}
45534552

0 commit comments

Comments
 (0)