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 = "");
};
} // 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",