From: David Greene Date: Wed, 19 Oct 2011 13:02:47 +0000 (+0000) Subject: Fix Name Check X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=7474c29d903d479e7f99eb0d1d097f75289c5f48;p=oota-llvm.git 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142502 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/TableGen/Record.h b/include/llvm/TableGen/Record.h index 55fe717087a..206718ce95a 100644 --- a/include/llvm/TableGen/Record.h +++ b/include/llvm/TableGen/Record.h @@ -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; }