@@ -3398,13 +3398,11 @@ class PrintExpr : public ExprVisitor<PrintExpr, void, Label>,
3398
3398
// / FIXME: This should use ExprWalker to print children.
3399
3399
3400
3400
void printCommon (Expr *E, const char *C, Label label) {
3401
- PrintOptions PO;
3402
- PO.PrintTypesForDebugging = true ;
3403
-
3404
3401
printHead (C, ExprColor, label);
3405
3402
3406
3403
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);
3408
3406
3409
3407
// If we have a source range and an ASTContext, print the source range.
3410
3408
if (auto Ty = GetTypeOfExpr (E)) {
@@ -4054,10 +4052,8 @@ class PrintExpr : public ExprVisitor<PrintExpr, void, Label>,
4054
4052
void visitForceTryExpr (ForceTryExpr *E, Label label) {
4055
4053
printCommon (E, " force_try_expr" , label);
4056
4054
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);
4061
4057
4062
4058
printRec (E->getSubExpr (), Label::optional (" sub_expr" ));
4063
4059
printFoot ();
@@ -4066,10 +4062,8 @@ class PrintExpr : public ExprVisitor<PrintExpr, void, Label>,
4066
4062
void visitOptionalTryExpr (OptionalTryExpr *E, Label label) {
4067
4063
printCommon (E, " optional_try_expr" , label);
4068
4064
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);
4073
4067
4074
4068
printRec (E->getSubExpr (), Label::optional (" sub_expr" ));
4075
4069
printFoot ();
@@ -4553,10 +4547,8 @@ class PrintExpr : public ExprVisitor<PrintExpr, void, Label>,
4553
4547
void visitTypeValueExpr (TypeValueExpr *E, Label label) {
4554
4548
printCommon (E, " type_value_expr" , label);
4555
4549
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);
4560
4552
4561
4553
printFoot ();
4562
4554
}
@@ -6828,7 +6820,7 @@ void RequirementRepr::dump() const {
6828
6820
}
6829
6821
6830
6822
void GenericParamList::dump () const {
6831
- print (llvm::errs ());
6823
+ print (llvm::errs (), PrintOptions::forDebugging () );
6832
6824
llvm::errs () << ' \n ' ;
6833
6825
}
6834
6826
@@ -6837,11 +6829,11 @@ void LayoutConstraint::dump() const {
6837
6829
llvm::errs () << " (null)\n " ;
6838
6830
return ;
6839
6831
}
6840
- getPointer ()->print (llvm::errs ());
6832
+ getPointer ()->print (llvm::errs (), PrintOptions::forDebugging () );
6841
6833
}
6842
6834
6843
6835
void GenericSignature::dump () const {
6844
- print (llvm::errs ());
6836
+ print (llvm::errs (), PrintOptions::forDebugging () );
6845
6837
llvm::errs () << ' \n ' ;
6846
6838
}
6847
6839
@@ -6876,7 +6868,7 @@ void InheritedEntry::dump(llvm::raw_ostream &os) const {
6876
6868
os << ' @' << getDumpString (getExplicitSafety ()) << ' ' ;
6877
6869
if (isSuppressed ())
6878
6870
os << " ~" ;
6879
- getType ().print (os);
6871
+ getType ().print (os, PrintOptions::forDebugging () );
6880
6872
}
6881
6873
6882
6874
void InheritedEntry::dump () const { dump (llvm::errs ()); }
0 commit comments