Add an error check for a typo I accidentally made in a td file that caused an assert to fire.
llvm-svn: 188742
diff --git a/llvm/lib/TableGen/TGParser.cpp b/llvm/lib/TableGen/TGParser.cpp
index 965cd00..daac574 100644
--- a/llvm/lib/TableGen/TGParser.cpp
+++ b/llvm/lib/TableGen/TGParser.cpp
@@ -2496,6 +2496,9 @@
if (Lex.getCode() != tgtok::comma) break;
Lex.Lex(); // eat ','.
+ if (Lex.getCode() != tgtok::Id)
+ return TokError("expected identifier");
+
SubClassLoc = Lex.getLoc();
// A defm can inherit from regular classes (non-multiclass) as