MC: Add MCSymbolData back to MCAssembler dump
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Wed, 20 May 2015 16:34:36 +0000 (16:34 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Wed, 20 May 2015 16:34:36 +0000 (16:34 +0000)
r237490 accidentally dropped MCSymbolData from the MCAssembler dump.
Add it back underneath the MCSymbol dump.  Remove the MCSymbol dump from
MCSymbolData, since this would cause an infinite co-recursion, and
besides, that back pointer is going away.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237807 91177308-0d34-0410-b5e6-96231b3b80d8

lib/MC/MCAssembler.cpp

index c8959cfd3982bccd40356a944a4ff4475d4bc949..c8ed7d1b1f67ac7553bf9fe7ac150dcee6db0f70 100644 (file)
@@ -1282,7 +1282,7 @@ void MCSectionData::dump() {
 void MCSymbolData::dump() const {
   raw_ostream &OS = llvm::errs();
 
-  OS << "<MCSymbolData Symbol:" << getSymbol()
+  OS << "<MCSymbolData"
      << " Fragment:" << getFragment();
   if (!isCommon())
     OS << " Offset:" << getOffset();
@@ -1311,7 +1311,11 @@ void MCAssembler::dump() {
 
   for (symbol_iterator it = symbol_begin(), ie = symbol_end(); it != ie; ++it) {
     if (it != symbol_begin()) OS << ",\n           ";
+    OS << "(";
     it->dump();
+    OS << ",";
+    it->getData().dump();
+    OS << ")";
   }
   OS << "]>\n";
 }