From 47a7021cc3b0858e53c52a468b234a3f1a4c4abf Mon Sep 17 00:00:00 2001 From: Jing Pu Date: Wed, 25 Sep 2019 18:33:09 -0700 Subject: [PATCH] Change the return type of createPrintCFGGraphPass to match other passes. PiperOrigin-RevId: 271252404 --- mlir/include/mlir/Transforms/ViewRegionGraph.h | 2 +- mlir/lib/Transforms/ViewRegionGraph.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mlir/include/mlir/Transforms/ViewRegionGraph.h b/mlir/include/mlir/Transforms/ViewRegionGraph.h index 626afc3..57fe1d3 100644 --- a/mlir/include/mlir/Transforms/ViewRegionGraph.h +++ b/mlir/include/mlir/Transforms/ViewRegionGraph.h @@ -41,7 +41,7 @@ llvm::raw_ostream &writeGraph(llvm::raw_ostream &os, Region ®ion, bool shortNames = false, const Twine &title = ""); /// Creates a pass to print CFG graphs. -OpPassBase * +std::unique_ptr> createPrintCFGGraphPass(llvm::raw_ostream &os = llvm::errs(), bool shortNames = false, const llvm::Twine &title = ""); diff --git a/mlir/lib/Transforms/ViewRegionGraph.cpp b/mlir/lib/Transforms/ViewRegionGraph.cpp index 2861112..57c2f31 100644 --- a/mlir/lib/Transforms/ViewRegionGraph.cpp +++ b/mlir/lib/Transforms/ViewRegionGraph.cpp @@ -85,10 +85,10 @@ private: }; } // namespace -OpPassBase *mlir::createPrintCFGGraphPass(llvm::raw_ostream &os, - bool shortNames, - const llvm::Twine &title) { - return new PrintCFGPass(os, shortNames, title); +std::unique_ptr> +mlir::createPrintCFGGraphPass(llvm::raw_ostream &os, bool shortNames, + const llvm::Twine &title) { + return std::make_unique(os, shortNames, title); } static PassRegistration pass("print-cfg-graph", -- 2.7.4