aboutsummaryrefslogtreecommitdiff
path: root/utils/TableGen/FileParser.y.cvs
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-10-11 18:13:09 +0000
committerChris Lattner <sabre@nondot.org>2006-10-11 18:13:09 +0000
commitbcc3f0a61dd584e3e03fdf7777264a7dc4932e0f (patch)
tree4fb287bf6edeb193dde1c1f4cd72748f97ad0365 /utils/TableGen/FileParser.y.cvs
parent1ceb6c830f4b79f142fc87bb643fb4fc190466fe (diff)
regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30888 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/FileParser.y.cvs')
-rw-r--r--utils/TableGen/FileParser.y.cvs12
1 files changed, 10 insertions, 2 deletions
diff --git a/utils/TableGen/FileParser.y.cvs b/utils/TableGen/FileParser.y.cvs
index c0e478d210..8e564564bd 100644
--- a/utils/TableGen/FileParser.y.cvs
+++ b/utils/TableGen/FileParser.y.cvs
@@ -624,9 +624,9 @@ ObjectBody : ClassList {
// Delete the template arg values for the class
delete (*$1)[i].second;
}
- delete $1; // Delete the class list...
+ delete $1; // Delete the class list.
- // Process any variables on the set stack...
+ // Process any variables on the let stack.
for (unsigned i = 0, e = LetStack.size(); i != e; ++i)
for (unsigned j = 0, e = LetStack[i].size(); j != e; ++j)
setValue(LetStack[i][j].Name,
@@ -743,6 +743,14 @@ DefMInst : DEFM ID { CurDefmPrefix = $2; } ':' SubClassRef ';' {
}
}
+ // If the mdef is inside a 'let' expression, add to each def.
+ for (unsigned i = 0, e = LetStack.size(); i != e; ++i)
+ for (unsigned j = 0, e = LetStack[i].size(); j != e; ++j)
+ setValue(LetStack[i][j].Name,
+ LetStack[i][j].HasBits ? &LetStack[i][j].Bits : 0,
+ LetStack[i][j].Value);
+
+
// Ensure redefinition doesn't happen.
if (Records.getDef(CurRec->getName())) {
err() << "def '" << CurRec->getName() << "' already defined, "