[Mlir-commits] [mlir] a6e8ed7 - Improve error message on pass registration failures to include the faulty pass name
Mehdi Amini
llvmlistbot at llvm.org
Wed Jun 16 17:25:01 PDT 2021
Author: Mehdi Amini
Date: 2021-06-17T00:24:50Z
New Revision: a6e8ed77762e2c973dbc60d6436d64a25f9f1bee
URL: https://github.com/llvm/llvm-project/commit/a6e8ed77762e2c973dbc60d6436d64a25f9f1bee
DIFF: https://github.com/llvm/llvm-project/commit/a6e8ed77762e2c973dbc60d6436d64a25f9f1bee.diff
LOG: Improve error message on pass registration failures to include the faulty pass name
Added:
Modified:
mlir/lib/Pass/PassRegistry.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Pass/PassRegistry.cpp b/mlir/lib/Pass/PassRegistry.cpp
index 7f002ac0186e..676f4637393f 100644
--- a/mlir/lib/Pass/PassRegistry.cpp
+++ b/mlir/lib/Pass/PassRegistry.cpp
@@ -127,7 +127,8 @@ void mlir::registerPass(const PassAllocatorFunction &function) {
StringRef arg = pass->getArgument();
if (arg.empty())
llvm::report_fatal_error(
- "Trying to register a pass that does not override `getArgument()`");
+ "Trying to register a pass that does not override `getArgument()`: " +
+ pass->getName());
registerPass(arg, pass->getDescription(), function);
}
More information about the Mlir-commits
mailing list