[llvm-commits] [llvm] r142515 - /llvm/trunk/lib/TableGen/TGParser.cpp
David Greene
greened at obbligato.org
Wed Oct 19 06:03:51 PDT 2011
Author: greened
Date: Wed Oct 19 08:03:51 2011
New Revision: 142515
URL: http://llvm.org/viewvc/llvm-project?rev=142515&view=rev
Log:
Fix Name Access
Get the Record name as a string explicitly to avoid asserts.
Modified:
llvm/trunk/lib/TableGen/TGParser.cpp
Modified: llvm/trunk/lib/TableGen/TGParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/TableGen/TGParser.cpp?rev=142515&r1=142514&r2=142515&view=diff
==============================================================================
--- llvm/trunk/lib/TableGen/TGParser.cpp (original)
+++ llvm/trunk/lib/TableGen/TGParser.cpp Wed Oct 19 08:03:51 2011
@@ -1694,8 +1694,9 @@
} else {
// Otherwise, a def inside a multiclass, add it to the multiclass.
for (unsigned i = 0, e = CurMultiClass->DefPrototypes.size(); i != e; ++i)
- if (CurMultiClass->DefPrototypes[i]->getName() == CurRec->getName()) {
- Error(DefLoc, "def '" + CurRec->getName() +
+ if (CurMultiClass->DefPrototypes[i]->getNameInit()
+ == CurRec->getNameInit()) {
+ Error(DefLoc, "def '" + CurRec->getNameInitAsString() +
"' already defined in this multiclass!");
return true;
}
More information about the llvm-commits
mailing list