@@ -3398,13 +3398,11 @@ class PrintExpr : public ExprVisitor<PrintExpr, void, Label>,
33983398 // / FIXME: This should use ExprWalker to print children.
33993399
34003400 void printCommon (Expr *E, const char *C, Label label) {
3401- PrintOptions PO;
3402- PO.PrintTypesForDebugging = true ;
3403-
34043401 printHead (C, ExprColor, label);
34053402
34063403 printFlag (E->isImplicit (), " implicit" , ExprModifierColor);
3407- printTypeField (GetTypeOfExpr (E), Label::always (" type" ), PO, TypeColor);
3404+ printTypeField (GetTypeOfExpr (E), Label::always (" type" ),
3405+ PrintOptions::forDebugging (), TypeColor);
34083406
34093407 // If we have a source range and an ASTContext, print the source range.
34103408 if (auto Ty = GetTypeOfExpr (E)) {
@@ -4054,10 +4052,8 @@ class PrintExpr : public ExprVisitor<PrintExpr, void, Label>,
40544052 void visitForceTryExpr (ForceTryExpr *E, Label label) {
40554053 printCommon (E, " force_try_expr" , label);
40564054
4057- PrintOptions PO;
4058- PO.PrintTypesForDebugging = true ;
4059- printTypeField (E->getThrownError (), Label::always (" thrown_error" ), PO,
4060- TypeColor);
4055+ printTypeField (E->getThrownError (), Label::always (" thrown_error" ),
4056+ PrintOptions::forDebugging (), TypeColor);
40614057
40624058 printRec (E->getSubExpr (), Label::optional (" sub_expr" ));
40634059 printFoot ();
@@ -4066,10 +4062,8 @@ class PrintExpr : public ExprVisitor<PrintExpr, void, Label>,
40664062 void visitOptionalTryExpr (OptionalTryExpr *E, Label label) {
40674063 printCommon (E, " optional_try_expr" , label);
40684064
4069- PrintOptions PO;
4070- PO.PrintTypesForDebugging = true ;
4071- printTypeField (E->getThrownError (), Label::always (" thrown_error" ), PO,
4072- TypeColor);
4065+ printTypeField (E->getThrownError (), Label::always (" thrown_error" ),
4066+ PrintOptions::forDebugging (), TypeColor);
40734067
40744068 printRec (E->getSubExpr (), Label::optional (" sub_expr" ));
40754069 printFoot ();
@@ -4553,10 +4547,8 @@ class PrintExpr : public ExprVisitor<PrintExpr, void, Label>,
45534547 void visitTypeValueExpr (TypeValueExpr *E, Label label) {
45544548 printCommon (E, " type_value_expr" , label);
45554549
4556- PrintOptions PO;
4557- PO.PrintTypesForDebugging = true ;
4558- printTypeField (E->getParamType (), Label::always (" param_type" ), PO,
4559- TypeColor);
4550+ printTypeField (E->getParamType (), Label::always (" param_type" ),
4551+ PrintOptions::forDebugging (), TypeColor);
45604552
45614553 printFoot ();
45624554 }
@@ -6828,7 +6820,7 @@ void RequirementRepr::dump() const {
68286820}
68296821
68306822void GenericParamList::dump () const {
6831- print (llvm::errs ());
6823+ print (llvm::errs (), PrintOptions::forDebugging () );
68326824 llvm::errs () << ' \n ' ;
68336825}
68346826
@@ -6837,11 +6829,11 @@ void LayoutConstraint::dump() const {
68376829 llvm::errs () << " (null)\n " ;
68386830 return ;
68396831 }
6840- getPointer ()->print (llvm::errs ());
6832+ getPointer ()->print (llvm::errs (), PrintOptions::forDebugging () );
68416833}
68426834
68436835void GenericSignature::dump () const {
6844- print (llvm::errs ());
6836+ print (llvm::errs (), PrintOptions::forDebugging () );
68456837 llvm::errs () << ' \n ' ;
68466838}
68476839
@@ -6876,7 +6868,7 @@ void InheritedEntry::dump(llvm::raw_ostream &os) const {
68766868 os << ' @' << getDumpString (getExplicitSafety ()) << ' ' ;
68776869 if (isSuppressed ())
68786870 os << " ~" ;
6879- getType ().print (os);
6871+ getType ().print (os, PrintOptions::forDebugging () );
68806872}
68816873
68826874void InheritedEntry::dump () const { dump (llvm::errs ()); }
0 commit comments