From 037804ddb3960c269f50e04dfbb67f4b7bfe7ba2 Mon Sep 17 00:00:00 2001 From: rkayaith Date: Thu, 20 Oct 2022 22:46:04 -0400 Subject: [PATCH] [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 --- mlir/lib/Pass/PassRegistry.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mlir/lib/Pass/PassRegistry.cpp b/mlir/lib/Pass/PassRegistry.cpp index 2d6f341..423c97c 100644 --- a/mlir/lib/Pass/PassRegistry.cpp +++ b/mlir/lib/Pass/PassRegistry.cpp @@ -699,13 +699,14 @@ FailureOr 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; } -- 2.7.4