[llvm-commits] [llvm] r141315 - /llvm/trunk/lib/TableGen/Record.cpp

David Greene greened at obbligato.org
Thu Oct 6 14:20:46 PDT 2011


Author: greened
Date: Thu Oct  6 16:20:46 2011
New Revision: 141315

URL: http://llvm.org/viewvc/llvm-project?rev=141315&view=rev
Log:
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.

Modified:
    llvm/trunk/lib/TableGen/Record.cpp

Modified: llvm/trunk/lib/TableGen/Record.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/TableGen/Record.cpp?rev=141315&r1=141314&r2=141315&view=diff
==============================================================================
--- llvm/trunk/lib/TableGen/Record.cpp (original)
+++ llvm/trunk/lib/TableGen/Record.cpp Thu Oct  6 16:20:46 2011
@@ -1456,7 +1456,9 @@
   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;
   }





More information about the llvm-commits mailing list