aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/TableGen/TGParser.cpp
diff options
context:
space:
mode:
authorNicolai Haehnle <nhaehnle@gmail.com>2018-03-05 15:20:51 +0000
committerNicolai Haehnle <nhaehnle@gmail.com>2018-03-05 15:20:51 +0000
commit0b0eaf7ee2bc86108ae0628cb4fbdb5e52c25cfb (patch)
tree9a9a40e1a6b5ed8a66775136a4d70c9f707812c2 /llvm/lib/TableGen/TGParser.cpp
parent2e5eeceeb7a100a4fe93d2535cad29829b87d101 (diff)
downloadllvm-0b0eaf7ee2bc86108ae0628cb4fbdb5e52c25cfb.zip
llvm-0b0eaf7ee2bc86108ae0628cb4fbdb5e52c25cfb.tar.gz
llvm-0b0eaf7ee2bc86108ae0628cb4fbdb5e52c25cfb.tar.bz2
TableGen: Introduce an abstract variable resolver interface
Summary: The intention is to allow us to more easily restructure how resolving is done, e.g. resolving multiple variables simultaneously, or using the resolving mechanism to implement !foreach. Change-Id: I4b976b54a32e240ad4f562f7eb86a4d663a20ea8 Reviewers: arsenm, craig.topper, tra, MartinO Subscribers: wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D43564 llvm-svn: 326704
Diffstat (limited to 'llvm/lib/TableGen/TGParser.cpp')
-rw-r--r--llvm/lib/TableGen/TGParser.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/TableGen/TGParser.cpp b/llvm/lib/TableGen/TGParser.cpp
index baf97ba..3ef6593 100644
--- a/llvm/lib/TableGen/TGParser.cpp
+++ b/llvm/lib/TableGen/TGParser.cpp
@@ -320,7 +320,8 @@ bool TGParser::ProcessForeachDefs(Record *CurRec, SMLoc Loc, IterSet &IterVals){
// Process each value.
for (unsigned i = 0; i < List->size(); ++i) {
- Init *ItemVal = List->getElement(i)->resolveReferences(*CurRec, nullptr);
+ RecordResolver R(*CurRec);
+ Init *ItemVal = List->getElement(i)->resolveReferences(R);
IterVals.push_back(IterRecord(CurLoop.IterVar, ItemVal));
if (ProcessForeachDefs(CurRec, Loc, IterVals))
return true;