From 711c41bd3d16bc9cbf3c7670761a386a4e0f2374 Mon Sep 17 00:00:00 2001 From: David Greene Date: Thu, 6 Oct 2011 21:20:46 +0000 Subject: [PATCH] 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. llvm-svn: 141315 --- lib/TableGen/Record.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/TableGen/Record.cpp b/lib/TableGen/Record.cpp index 44945e3adb6..b7c51cae953 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(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; }