[Mlir-commits] [mlir] 037804d - [mlir][Pass] Fix parsePassPipeline error stream
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Fri Oct 21 11:26:27 PDT 2022
Author: rkayaith
Date: 2022-10-21T14:26:21-04:00
New Revision: 037804ddb3960c269f50e04dfbb67f4b7bfe7ba2
URL: https://github.com/llvm/llvm-project/commit/037804ddb3960c269f50e04dfbb67f4b7bfe7ba2
DIFF: https://github.com/llvm/llvm-project/commit/037804ddb3960c269f50e04dfbb67f4b7bfe7ba2.diff
LOG: [mlir][Pass] Fix parsePassPipeline error stream
The error stream isn't being propagated properly, causing some output to
be sent to stderr even when a different stream is given.
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D136414
Added:
Modified:
mlir/lib/Pass/PassRegistry.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Pass/PassRegistry.cpp b/mlir/lib/Pass/PassRegistry.cpp
index 2d6f3417b2c9e..423c97c7a6466 100644
--- a/mlir/lib/Pass/PassRegistry.cpp
+++ b/mlir/lib/Pass/PassRegistry.cpp
@@ -699,13 +699,14 @@ FailureOr<OpPassManager> mlir::parsePassPipeline(StringRef pipeline,
if (pipelineStart == 0 || pipelineStart == StringRef::npos ||
!pipeline.consume_back(")")) {
errorStream << "expected pass pipeline to be wrapped with the anchor "
- "operation type, e.g. `builtin.module(...)";
+ "operation type, e.g. 'builtin.module(...)'";
return failure();
}
StringRef opName = pipeline.take_front(pipelineStart);
OpPassManager pm(opName);
- if (failed(parsePassPipeline(pipeline.drop_front(1 + pipelineStart), pm)))
+ if (failed(parsePassPipeline(pipeline.drop_front(1 + pipelineStart), pm,
+ errorStream)))
return failure();
return pm;
}
More information about the Mlir-commits
mailing list