[Mlir-commits] [mlir] 9f2fbfa - Use report_fatal_error instead of llvm::errs() + abort() (NFC)
Mehdi Amini
llvmlistbot at llvm.org
Fri Aug 28 17:36:17 PDT 2020
Author: Mehdi Amini
Date: 2020-08-29T00:36:08Z
New Revision: 9f2fbfab8d91cc8c623704d03991d4fe755fc1b1
URL: https://github.com/llvm/llvm-project/commit/9f2fbfab8d91cc8c623704d03991d4fe755fc1b1
DIFF: https://github.com/llvm/llvm-project/commit/9f2fbfab8d91cc8c623704d03991d4fe755fc1b1.diff
LOG: Use report_fatal_error instead of llvm::errs() + abort() (NFC)
This is making the error reporting in line with other fatal errors.
Added:
Modified:
mlir/lib/IR/MLIRContext.cpp
Removed:
################################################################################
diff --git a/mlir/lib/IR/MLIRContext.cpp b/mlir/lib/IR/MLIRContext.cpp
index 1d81fde69e4c..67658a9ca33a 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");
More information about the Mlir-commits
mailing list