[llvm-commits] [llvm] r142502 - /llvm/trunk/include/llvm/TableGen/Record.h

David Greene greened at obbligato.org
Wed Oct 19 06:02:47 PDT 2011


Author: greened
Date: Wed Oct 19 08:02:47 2011
New Revision: 142502

URL: http://llvm.org/viewvc/llvm-project?rev=142502&view=rev
Log:
Fix Name Check

Record names may not be fully resolved at this point so ask for the
record name as a string explicitly.  This avoids a potential assert.

Modified:
    llvm/trunk/include/llvm/TableGen/Record.h

Modified: llvm/trunk/include/llvm/TableGen/Record.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/TableGen/Record.h?rev=142502&r1=142501&r2=142502&view=diff
==============================================================================
--- llvm/trunk/include/llvm/TableGen/Record.h (original)
+++ llvm/trunk/include/llvm/TableGen/Record.h Wed Oct 19 08:02:47 2011
@@ -1490,7 +1490,7 @@
 
   bool isSubClassOf(StringRef Name) const {
     for (unsigned i = 0, e = SuperClasses.size(); i != e; ++i)
-      if (SuperClasses[i]->getName() == Name)
+      if (SuperClasses[i]->getNameInitAsString() == Name)
         return true;
     return false;
   }





More information about the llvm-commits mailing list