summaryrefslogtreecommitdiff
path: root/lib/TableGen/Record.cpp
diff options
context:
space:
mode:
authorDavid Greene <greened@obbligato.org>2011-10-06 21:20:46 +0000
committerDavid Greene <greened@obbligato.org>2011-10-06 21:20:46 +0000
commitd2b9f20b188966722bca10714c237aa036e8c808 (patch)
tree7d08c6f25b66a1dbe0cd4308fcd64b83b3cf96cc /lib/TableGen/Record.cpp
parent2f0722c10575154c35b51a3e4e77832b75001a13 (diff)
downloadllvm-d2b9f20b188966722bca10714c237aa036e8c808.tar.gz
llvm-d2b9f20b188966722bca10714c237aa036e8c808.tar.bz2
llvm-d2b9f20b188966722bca10714c237aa036e8c808.tar.xz
Fix List-of-List Processing
Fix VarListElementInit::resolveListElementReference to return a partially resolved VarListElementInint in the case where full resolution is not possible. This allows TableGen to make forward progress resolving certain complex list expressions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141315 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/TableGen/Record.cpp')
-rw-r--r--lib/TableGen/Record.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/TableGen/Record.cpp b/lib/TableGen/Record.cpp
index 44945e3adb..b7c51cae95 100644
--- a/lib/TableGen/Record.cpp
+++ b/lib/TableGen/Record.cpp
@@ -1456,7 +1456,9 @@ Init *VarListElementInit:: resolveListElementReference(Record &R,
if (Result) {
TypedInit *TInit = dynamic_cast<TypedInit *>(Result);
if (TInit) {
- return TInit->resolveListElementReference(R, RV, Elt);
+ Init *Result2 = TInit->resolveListElementReference(R, RV, Elt);
+ if (Result2) return Result2;
+ return new VarListElementInit(TInit, Elt);
}
return Result;
}