diff options
author | David Greene <greened@obbligato.org> | 2011-10-06 21:20:46 +0000 |
---|---|---|
committer | David Greene <greened@obbligato.org> | 2011-10-06 21:20:46 +0000 |
commit | d2b9f20b188966722bca10714c237aa036e8c808 (patch) | |
tree | 7d08c6f25b66a1dbe0cd4308fcd64b83b3cf96cc /lib/TableGen | |
parent | 2f0722c10575154c35b51a3e4e77832b75001a13 (diff) | |
download | external_llvm-d2b9f20b188966722bca10714c237aa036e8c808.zip external_llvm-d2b9f20b188966722bca10714c237aa036e8c808.tar.gz external_llvm-d2b9f20b188966722bca10714c237aa036e8c808.tar.bz2 |
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')
-rw-r--r-- | lib/TableGen/Record.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/TableGen/Record.cpp b/lib/TableGen/Record.cpp index 44945e3..b7c51ca 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; } |