[llvm-commits] [llvm] r49462 - /llvm/trunk/utils/TableGen/TGParser.cpp
Chris Lattner
sabre at nondot.org
Wed Apr 9 21:48:34 PDT 2008
Author: lattner
Date: Wed Apr 9 23:48:34 2008
New Revision: 49462
URL: http://llvm.org/viewvc/llvm-project?rev=49462&view=rev
Log:
produce an error on invalid input instead of asserting:
def : Pat<((v2f64 (vector_shuffle immAllZerosV_bc,
^
Modified:
llvm/trunk/utils/TableGen/TGParser.cpp
Modified: llvm/trunk/utils/TableGen/TGParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/TGParser.cpp?rev=49462&r1=49461&r2=49462&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/TGParser.cpp (original)
+++ llvm/trunk/utils/TableGen/TGParser.cpp Wed Apr 9 23:48:34 2008
@@ -616,6 +616,11 @@
}
case tgtok::l_paren: { // Value ::= '(' IDValue DagArgList ')'
Lex.Lex(); // eat the '('
+ if (Lex.getCode() != tgtok::Id) {
+ TokError("expected identifier in dag init");
+ return 0;
+ }
+
Init *Operator = ParseIDValue(CurRec);
if (Operator == 0) return 0;
More information about the llvm-commits
mailing list