Skip to content

Commit

Permalink
Change the return type of createPrintCFGGraphPass to match other passes.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 271252404
  • Loading branch information
jingpu authored and tensorflower-gardener committed Sep 26, 2019
1 parent ae13c28 commit 47a7021
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion mlir/include/mlir/Transforms/ViewRegionGraph.h
Expand Up @@ -41,7 +41,7 @@ llvm::raw_ostream &writeGraph(llvm::raw_ostream &os, Region &region,
bool shortNames = false, const Twine &title = "");

/// Creates a pass to print CFG graphs.
OpPassBase<FuncOp> *
std::unique_ptr<mlir::OpPassBase<mlir::FuncOp>>
createPrintCFGGraphPass(llvm::raw_ostream &os = llvm::errs(),
bool shortNames = false, const llvm::Twine &title = "");

Expand Down
8 changes: 4 additions & 4 deletions mlir/lib/Transforms/ViewRegionGraph.cpp
Expand Up @@ -85,10 +85,10 @@ struct PrintCFGPass : public FunctionPass<PrintCFGPass> {
};
} // namespace

OpPassBase<FuncOp> *mlir::createPrintCFGGraphPass(llvm::raw_ostream &os,
bool shortNames,
const llvm::Twine &title) {
return new PrintCFGPass(os, shortNames, title);
std::unique_ptr<mlir::OpPassBase<mlir::FuncOp>>
mlir::createPrintCFGGraphPass(llvm::raw_ostream &os, bool shortNames,
const llvm::Twine &title) {
return std::make_unique<PrintCFGPass>(os, shortNames, title);
}

static PassRegistration<PrintCFGPass> pass("print-cfg-graph",
Expand Down

0 comments on commit 47a7021

Please sign in to comment.