diff --git a/mlir/include/mlir/Pass/PassManager.h b/mlir/include/mlir/Pass/PassManager.h --- a/mlir/include/mlir/Pass/PassManager.h +++ b/mlir/include/mlir/Pass/PassManager.h @@ -19,6 +19,7 @@ namespace llvm { class Any; +raw_ostream &errs(); } // end namespace llvm namespace mlir { @@ -221,9 +222,12 @@ /// potential mutations were made. /// * 'out' corresponds to the stream to output the printed IR to. void enableIRPrinting( - std::function shouldPrintBeforePass, - std::function shouldPrintAfterPass, - bool printModuleScope, bool printAfterOnlyOnChange, raw_ostream &out); + std::function shouldPrintBeforePass = + [](Pass *, Operation *) { return true; }, + std::function shouldPrintAfterPass = + [](Pass *, Operation *) { return true; }, + bool printModuleScope = true, bool printAfterOnlyOnChange = true, + raw_ostream &out = llvm::errs()); //===--------------------------------------------------------------------===// // Pass Timing