OSDN Git Service

Fix Name Check
authorDavid Greene <greened@obbligato.org>
Wed, 19 Oct 2011 13:02:47 +0000 (13:02 +0000)
committerDavid Greene <greened@obbligato.org>
Wed, 19 Oct 2011 13:02:47 +0000 (13:02 +0000)
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142502 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/TableGen/Record.h

index 55fe717..206718c 100644 (file)
@@ -1490,7 +1490,7 @@ public:
 
   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;
   }