summaryrefslogtreecommitdiffstats
path: root/mlir/lib/IR/MLIRContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mlir/lib/IR/MLIRContext.cpp')
-rw-r--r--mlir/lib/IR/MLIRContext.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/mlir/lib/IR/MLIRContext.cpp b/mlir/lib/IR/MLIRContext.cpp
index 5161c27368c..6e3c7c9da5a 100644
--- a/mlir/lib/IR/MLIRContext.cpp
+++ b/mlir/lib/IR/MLIRContext.cpp
@@ -422,14 +422,17 @@ static ArrayRef<T> copyArrayRefInto(llvm::BumpPtrAllocator &allocator,
// Diagnostic Handlers
//===----------------------------------------------------------------------===//
-bool MLIRContext::emitError(Location location, const llvm::Twine &message) {
- getImpl().diagEngine.emit(location, message, DiagnosticSeverity::Error);
- return true;
+InFlightDiagnostic MLIRContext::emitError(Location location,
+ const llvm::Twine &message) {
+ return getImpl().diagEngine.emit(location, DiagnosticSeverity::Error)
+ << message;
}
/// Emit a remark message using the diagnostic engine.
-void MLIRContext::emitRemark(Location location, const Twine &message) {
- getImpl().diagEngine.emit(location, message, DiagnosticSeverity::Remark);
+InFlightDiagnostic MLIRContext::emitRemark(Location location,
+ const Twine &message) {
+ return getImpl().diagEngine.emit(location, DiagnosticSeverity::Remark)
+ << message;
}
/// Returns the diagnostic engine for this context.
OpenPOWER on IntegriCloud