Improve error message on pass registration failures to include the faulty pass name

This commit is contained in:
Mehdi Amini 2021-06-17 00:22:35 +00:00
parent b88eb855b5
commit a6e8ed7776

View file

@ -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);
}