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
This commit is contained in:
David Greene 2011-10-19 13:02:47 +00:00
parent f7931b7040
commit 7474c29d90

View 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;
}