From 7474c29d903d479e7f99eb0d1d097f75289c5f48 Mon Sep 17 00:00:00 2001 From: David Greene Date: Wed, 19 Oct 2011 13:02:47 +0000 Subject: [PATCH] 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 --- include/llvm/TableGen/Record.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.34.1