[Mlir-commits] [mlir] 464223b - [mlir] mlir-opt: print a newline after the top-level module
Alex Zinenko
llvmlistbot at llvm.org
Mon Mar 2 02:43:19 PST 2020
Author: Alex Zinenko
Date: 2020-03-02T11:43:12+01:00
New Revision: 464223b5ac9225eb54e9e73198773f59374f2a9c
URL: https://github.com/llvm/llvm-project/commit/464223b5ac9225eb54e9e73198773f59374f2a9c
DIFF: https://github.com/llvm/llvm-project/commit/464223b5ac9225eb54e9e73198773f59374f2a9c.diff
LOG: [mlir] mlir-opt: print a newline after the top-level module
A printer refactoring removed automatic newline printing in the printer
of a ModuleOp. As a consequence, mlir-opt no longer printed a newline
after the closing brace of a module, which made it hard to distinguish
when used from command line. Print the newline character explicitly in
mlir-opt.
Added:
Modified:
mlir/lib/Support/MlirOptMain.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Support/MlirOptMain.cpp b/mlir/lib/Support/MlirOptMain.cpp
index 1bc3e8a1a7af..e2044c90ffd8 100644
--- a/mlir/lib/Support/MlirOptMain.cpp
+++ b/mlir/lib/Support/MlirOptMain.cpp
@@ -59,6 +59,7 @@ static LogicalResult performActions(raw_ostream &os, bool verifyDiagnostics,
// Print the output.
module->print(os);
+ os << '\n';
return success();
}
More information about the Mlir-commits
mailing list