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
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;
}