[llvm-commits] CVS: llvm/utils/TableGen/FileParser.y
Chris Lattner
lattner at cs.uiuc.edu
Wed Jul 30 00:18:01 PDT 2003
Changes in directory llvm/utils/TableGen:
FileParser.y updated: 1.9 -> 1.10
---
Log message:
Fix coredump for when an ID is used illegally outside a record
---
Diffs of the changes:
Index: llvm/utils/TableGen/FileParser.y
diff -u llvm/utils/TableGen/FileParser.y:1.9 llvm/utils/TableGen/FileParser.y:1.10
--- llvm/utils/TableGen/FileParser.y:1.9 Tue Jul 29 23:56:04 2003
+++ llvm/utils/TableGen/FileParser.y Wed Jul 30 00:17:35 2003
@@ -245,6 +245,10 @@
$$ = Init;
delete $2;
} | ID {
+ if (CurRec == 0) {
+ err() << "Def/Class name '" << *$1 << "' not allowed here!\n";
+ abort();
+ }
if (const RecordVal *RV = CurRec->getValue(*$1)) {
$$ = new VarInit(*$1, RV->getType());
} else if (Record *D = Records.getDef(*$1)) {
More information about the llvm-commits
mailing list