Improve error message on pass registration failures to include the faulty pass name
This commit is contained in:
parent
b88eb855b5
commit
a6e8ed7776
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue