[llvm-commits] CVS: llvm/utils/TableGen/FileParser.y
Chris Lattner
lattner at cs.uiuc.edu
Mon Dec 2 10:44:02 PST 2002
Changes in directory llvm/utils/TableGen:
FileParser.y updated: 1.1 -> 1.2
---
Log message:
Add support for field exprs
---
Diffs of the changes:
Index: llvm/utils/TableGen/FileParser.y
diff -u llvm/utils/TableGen/FileParser.y:1.1 llvm/utils/TableGen/FileParser.y:1.2
--- llvm/utils/TableGen/FileParser.y:1.1 Sun Dec 1 19:23:04 2002
+++ llvm/utils/TableGen/FileParser.y Mon Dec 2 10:43:43 2002
@@ -258,6 +258,13 @@
} | '[' DefList ']' {
$$ = new ListInit(*$2);
delete $2;
+ } | Value '.' ID {
+ if (!$1->getFieldType(*$3)) {
+ err() << "Cannot access field '" << *$3 << "' of value '" << *$1 << "!\n";
+ abort();
+ }
+ $$ = new FieldInit($1, *$3);
+ delete $3;
};
DefList : /*empty */ {
More information about the llvm-commits
mailing list