[llvm-commits] [llvm] r142504 - /llvm/trunk/lib/TableGen/Record.cpp

David Greene greened at obbligato.org
Wed Oct 19 06:02:52 PDT 2011


Author: greened
Date: Wed Oct 19 08:02:52 2011
New Revision: 142504

URL: http://llvm.org/viewvc/llvm-project?rev=142504&view=rev
Log:
Fix Name Access

Ask for the record name as a string explicitly to avoid a potential
assert.

Modified:
    llvm/trunk/lib/TableGen/Record.cpp

Modified: llvm/trunk/lib/TableGen/Record.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/TableGen/Record.cpp?rev=142504&r1=142503&r2=142504&view=diff
==============================================================================
--- llvm/trunk/lib/TableGen/Record.cpp (original)
+++ llvm/trunk/lib/TableGen/Record.cpp Wed Oct 19 08:02:52 2011
@@ -1674,7 +1674,7 @@
 
 void RecordVal::print(raw_ostream &OS, bool PrintSem) const {
   if (getPrefix()) OS << "field ";
-  OS << *getType() << " " << getName();
+  OS << *getType() << " " << getNameInitAsString();
 
   if (getValue())
     OS << " = " << *getValue();





More information about the llvm-commits mailing list