summaryrefslogtreecommitdiff
path: root/lib/TableGen
diff options
context:
space:
mode:
Diffstat (limited to 'lib/TableGen')
-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;
}