[llvm-commits] [llvm] r149153 - /llvm/trunk/lib/TableGen/TGParser.cpp

David Greene greened at obbligato.org
Fri Jan 27 16:03:24 PST 2012


Author: greened
Date: Fri Jan 27 18:03:24 2012
New Revision: 149153

URL: http://llvm.org/viewvc/llvm-project?rev=149153&view=rev
Log:
Fix Record Name Reference

Get the record name though the init to avoid an assert.

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=149153&r1=149152&r2=149153&view=diff
==============================================================================
--- llvm/trunk/lib/TableGen/TGParser.cpp (original)
+++ llvm/trunk/lib/TableGen/TGParser.cpp Fri Jan 27 18:03:24 2012
@@ -1775,7 +1775,7 @@
     // Top-level def definition.
 
     // Ensure redefinition doesn't happen.
-    if (Records.getDef(CurRec->getName())) {
+    if (Records.getDef(CurRec->getNameInitAsString())) {
       Error(DefLoc, "def '" + CurRec->getNameInitAsString()
             + "' already defined");
       return true;





More information about the llvm-commits mailing list