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 | 998a39aeed9814dc74f2f26afd2637f0b93b9403 (patch) | |
tree | 6bfa96b1f22b7c7643d2393dbec12b9438b2acc1 /llvm/lib/TableGen | |
parent | f381afc906c279f4f2fb6c622144eb740a9b5fac (diff) | |
download | bcm5719-llvm-998a39aeed9814dc74f2f26afd2637f0b93b9403.tar.gz bcm5719-llvm-998a39aeed9814dc74f2f26afd2637f0b93b9403.zip |
Add an error check for a typo I accidentally made in a td file that caused an assert to fire.
llvm-svn: 188742
Diffstat (limited to 'llvm/lib/TableGen')
-rw-r--r-- | llvm/lib/TableGen/TGParser.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/TableGen/TGParser.cpp b/llvm/lib/TableGen/TGParser.cpp index 965cd00396e..daac5747d3e 100644 --- a/llvm/lib/TableGen/TGParser.cpp +++ b/llvm/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 |