From 9f2fbfab8d91cc8c623704d03991d4fe755fc1b1 Mon Sep 17 00:00:00 2001 From: Mehdi Amini Date: Sat, 29 Aug 2020 00:34:59 +0000 Subject: [PATCH] Use report_fatal_error instead of llvm::errs() + abort() (NFC) This is making the error reporting in line with other fatal errors. --- mlir/lib/IR/MLIRContext.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/mlir/lib/IR/MLIRContext.cpp b/mlir/lib/IR/MLIRContext.cpp index 1d81fde..67658a9 100644 --- a/mlir/lib/IR/MLIRContext.cpp +++ b/mlir/lib/IR/MLIRContext.cpp @@ -495,13 +495,12 @@ MLIRContext::getOrLoadDialect(StringRef dialectNamespace, TypeID dialectID, LLVM_DEBUG(llvm::dbgs() << "Load new dialect in Context" << dialectNamespace); #ifndef NDEBUG - if (impl.multiThreadedExecutionContext != 0) { - llvm::errs() << "Loading a dialect (" << dialectNamespace - << ") while in a multi-threaded execution context (maybe " - "the PassManager): this can indicate a " - "missing `dependentDialects` in a pass for example."; - abort(); - } + if (impl.multiThreadedExecutionContext != 0) + llvm::report_fatal_error( + "Loading a dialect (" + dialectNamespace + + ") while in a multi-threaded execution context (maybe " + "the PassManager): this can indicate a " + "missing `dependentDialects` in a pass for example."); #endif dialect = ctor(); assert(dialect && "dialect ctor failed"); -- 2.7.4