[PATCH] D44936: TableGen: More helpful error messages
Phabricator via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 1 10:11:41 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL328936: TableGen: More helpful error messages (authored by nha, committed by ).
Repository:
rL LLVM
https://reviews.llvm.org/D44936
Files:
llvm/trunk/utils/TableGen/CodeGenTarget.cpp
Index: llvm/trunk/utils/TableGen/CodeGenTarget.cpp
===================================================================
--- llvm/trunk/utils/TableGen/CodeGenTarget.cpp
+++ llvm/trunk/utils/TableGen/CodeGenTarget.cpp
@@ -615,8 +615,12 @@
MVT::SimpleValueType VT;
if (TyEl->isSubClassOf("LLVMMatchType")) {
unsigned MatchTy = TyEl->getValueAsInt("Number");
- assert(MatchTy < OverloadedVTs.size() &&
- "Invalid matching number!");
+ if (MatchTy >= OverloadedVTs.size()) {
+ PrintError(R->getLoc(),
+ "Parameter #" + Twine(i) + " has out of bounds matching "
+ "number " + Twine(MatchTy));
+ PrintFatalError(Twine("ParamTypes is ") + TypeList->getAsString());
+ }
VT = OverloadedVTs[MatchTy];
// It only makes sense to use the extended and truncated vector element
// variants with iAny types; otherwise, if the intrinsic is not
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44936.140583.patch
Type: text/x-patch
Size: 940 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180401/7f36f852/attachment.bin>
More information about the llvm-commits
mailing list