projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
36fe6d2
)
Fix a crash on code like: let x = 1 {x
author
Chris Lattner
<sabre@nondot.org>
Thu, 10 Jan 2008 07:01:53 +0000
(07:01 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Thu, 10 Jan 2008 07:01:53 +0000
(07:01 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45827
91177308
-0d34-0410-b5e6-
96231b3b80d8
utils/TableGen/TGParser.cpp
patch
|
blob
|
history
diff --git
a/utils/TableGen/TGParser.cpp
b/utils/TableGen/TGParser.cpp
index fdc162b4a44fd53c6facdc565be218e859db4c43..65b6b818493c868819a412bfb47020d493d524d3 100644
(file)
--- a/
utils/TableGen/TGParser.cpp
+++ b/
utils/TableGen/TGParser.cpp
@@
-290,7
+290,10
@@
ParseSubClassReference(Record *CurRec, bool isDefm) {
/// 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;