From 5cc16a9d89d98c67882aeb3baa3c7813c71b4594 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Tue, 20 Aug 2013 04:22:09 +0000 Subject: 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 --- lib/TableGen/TGParser.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/TableGen') diff --git a/lib/TableGen/TGParser.cpp b/lib/TableGen/TGParser.cpp index 965cd00396..daac5747d3 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 -- cgit v1.2.3