[PATCH] D46556: [MC] Move MCAssembler::dump into the correct cpp file. NFC

Phabricator via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 14 07:08:59 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL334713: [MC] Move MCAssembler::dump into the correct cpp file. NFC (authored by sbc, committed by ).

Repository:
  rL LLVM

https://reviews.llvm.org/D46556

Files:
  llvm/trunk/lib/MC/MCAssembler.cpp
  llvm/trunk/lib/MC/MCFragment.cpp


Index: llvm/trunk/lib/MC/MCAssembler.cpp
===================================================================
--- llvm/trunk/lib/MC/MCAssembler.cpp
+++ llvm/trunk/lib/MC/MCAssembler.cpp
@@ -1065,3 +1065,27 @@
   }
   getBackend().finishLayout(*this, Layout);
 }
+
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
+LLVM_DUMP_METHOD void MCAssembler::dump() const{
+  raw_ostream &OS = errs();
+
+  OS << "<MCAssembler\n";
+  OS << "  Sections:[\n    ";
+  for (const_iterator it = begin(), ie = end(); it != ie; ++it) {
+    if (it != begin()) OS << ",\n    ";
+    it->dump();
+  }
+  OS << "],\n";
+  OS << "  Symbols:[";
+
+  for (const_symbol_iterator it = symbol_begin(), ie = symbol_end(); it != ie; ++it) {
+    if (it != symbol_begin()) OS << ",\n           ";
+    OS << "(";
+    it->dump();
+    OS << ", Index:" << it->getIndex() << ", ";
+    OS << ")";
+  }
+  OS << "]>\n";
+}
+#endif
Index: llvm/trunk/lib/MC/MCFragment.cpp
===================================================================
--- llvm/trunk/lib/MC/MCFragment.cpp
+++ llvm/trunk/lib/MC/MCFragment.cpp
@@ -465,26 +465,4 @@
   }
   OS << ">";
 }
-
-LLVM_DUMP_METHOD void MCAssembler::dump() const{
-  raw_ostream &OS = errs();
-
-  OS << "<MCAssembler\n";
-  OS << "  Sections:[\n    ";
-  for (const_iterator it = begin(), ie = end(); it != ie; ++it) {
-    if (it != begin()) OS << ",\n    ";
-    it->dump();
-  }
-  OS << "],\n";
-  OS << "  Symbols:[";
-
-  for (const_symbol_iterator it = symbol_begin(), ie = symbol_end(); it != ie; ++it) {
-    if (it != symbol_begin()) OS << ",\n           ";
-    OS << "(";
-    it->dump();
-    OS << ", Index:" << it->getIndex() << ", ";
-    OS << ")";
-  }
-  OS << "]>\n";
-}
 #endif


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46556.151348.patch
Type: text/x-patch
Size: 1713 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180614/a1c32a32/attachment.bin>


More information about the llvm-commits mailing list