diff options
author | Craig Topper <craig.topper@gmail.com> | 2013-08-20 04:22:09 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2013-08-20 04:22:09 +0000 |
commit | 5cc16a9d89d98c67882aeb3baa3c7813c71b4594 (patch) | |
tree | 86c756350c1aa4e5c208877f85dcbd534bad8dc4 /lib | |
parent | 6af35e95765e2d577919714dfbdac3ebf84cac78 (diff) | |
download | external_llvm-5cc16a9d89d98c67882aeb3baa3c7813c71b4594.zip external_llvm-5cc16a9d89d98c67882aeb3baa3c7813c71b4594.tar.gz external_llvm-5cc16a9d89d98c67882aeb3baa3c7813c71b4594.tar.bz2 |
Add an error check for a typo I accidentally made in a td file that caused an assert to fire.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188742 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/TableGen/TGParser.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/TableGen/TGParser.cpp b/lib/TableGen/TGParser.cpp index 965cd00..daac574 100644 --- a/lib/TableGen/TGParser.cpp +++ b/lib/TableGen/TGParser.cpp @@ -2496,6 +2496,9 @@ bool TGParser::ParseDefm(MultiClass *CurMultiClass) { 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 |