From c7711ba2efea9108a5046272ebc2434aaaa8a23e Mon Sep 17 00:00:00 2001 From: Nicolai Haehnle Date: Fri, 23 Feb 2018 10:46:21 +0000 Subject: [PATCH] TableGen: Avoid using resolveListElementReference in TGParser A subsequent change intends to remove resolveListElementReference entirely. This part of the removal can be split out for better bisectability. Change-Id: Ibd762d88fd2d1e2cc116a259e2a27a5e9f9a8b10 Reviewers: arsenm, craig.topper, tra, MartinO Subscribers: wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D43561 Change-Id: Ifb695041cef1964ad8a3102f448249501a9243f0 llvm-svn: 325886 --- llvm/lib/TableGen/TGParser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/TableGen/TGParser.cpp b/llvm/lib/TableGen/TGParser.cpp index 86344d334500..4dd05fd32979 100644 --- a/llvm/lib/TableGen/TGParser.cpp +++ b/llvm/lib/TableGen/TGParser.cpp @@ -317,7 +317,7 @@ bool TGParser::ProcessForeachDefs(Record *CurRec, SMLoc Loc, IterSet &IterVals){ // Process each value. for (unsigned i = 0; i < List->size(); ++i) { - Init *ItemVal = List->resolveListElementReference(*CurRec, nullptr, i); + Init *ItemVal = List->getElement(i)->resolveReferences(*CurRec, nullptr); IterVals.push_back(IterRecord(CurLoop.IterVar, ItemVal)); if (ProcessForeachDefs(CurRec, Loc, IterVals)) return true;