[llvm-commits] [llvm] r45827 - /llvm/trunk/utils/TableGen/TGParser.cpp
Chris Lattner
sabre at nondot.org
Wed Jan 9 23:01:55 PST 2008
Author: lattner
Date: Thu Jan 10 01:01:53 2008
New Revision: 45827
URL: http://llvm.org/viewvc/llvm-project?rev=45827&view=rev
Log:
Fix a crash on code like: let x = 1 {x
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=45827&r1=45826&r2=45827&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/TGParser.cpp (original)
+++ llvm/trunk/utils/TableGen/TGParser.cpp Thu Jan 10 01:01:53 2008
@@ -290,7 +290,10 @@
/// RangePiece ::= INTVAL '-' INTVAL
/// RangePiece ::= INTVAL INTVAL
bool TGParser::ParseRangePiece(std::vector<unsigned> &Ranges) {
- assert(Lex.getCode() == tgtok::IntVal && "Invalid range");
+ if (Lex.getCode() != tgtok::IntVal) {
+ TokError("expected integer or bitrange");
+ return true;
+ }
int Start = Lex.getCurIntVal();
int End;
More information about the llvm-commits
mailing list