forked from OSchip/llvm-project
Improve error reporting on pass registration collision (NFC)
Differential Revision: https://reviews.llvm.org/D104430
This commit is contained in:
parent
01cb9c5fc5
commit
6a071e535f
|
@ -116,10 +116,11 @@ void mlir::registerPass(StringRef arg, StringRef description,
|
|||
// arg before it.
|
||||
TypeID entryTypeID = function()->getTypeID();
|
||||
auto it = passRegistryTypeIDs->try_emplace(arg, entryTypeID).first;
|
||||
if (it->second != entryTypeID) {
|
||||
llvm_unreachable("pass allocator creates a different pass than previously "
|
||||
"registered");
|
||||
}
|
||||
if (it->second != entryTypeID)
|
||||
llvm::report_fatal_error(
|
||||
"pass allocator creates a different pass than previously "
|
||||
"registered for pass " +
|
||||
arg);
|
||||
}
|
||||
|
||||
void mlir::registerPass(const PassAllocatorFunction &function) {
|
||||
|
|
Loading…
Reference in New Issue