mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 02:33:06 +01:00
[TableGen] Emit more helpful error messages on empty type set
I have seen this error quite frequently in our out-of-tree CHERI backends and the lack of location information sometimes makes it quite difficult to track down the actual source of the error. This patch changes the llvm_unreachable() to a PrintFatalError() so that tablegen prints a stack of source locations. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D99468
This commit is contained in:
parent
e6f3a5b86f
commit
99e7c8e198
@ -846,7 +846,11 @@ TypeInfer::ValidateOnExit::~ValidateOnExit() {
|
||||
"(use -print-records with llvm-tblgen to see all "
|
||||
"expanded records).\n";
|
||||
Infer.TP.dump();
|
||||
llvm_unreachable(nullptr);
|
||||
dbgs() << "Generated from record:\n";
|
||||
Infer.TP.getRecord()->dump();
|
||||
PrintFatalError(Infer.TP.getRecord()->getLoc(),
|
||||
"Type set is empty for each HW mode in '" +
|
||||
Infer.TP.getRecord()->getName() + "'");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user