[llvm] r334713 - [MC] Move MCAssembler::dump into the correct cpp file. NFC
Sam Clegg via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 14 07:04:24 PDT 2018
Author: sbc
Date: Thu Jun 14 07:04:23 2018
New Revision: 334713
URL: http://llvm.org/viewvc/llvm-project?rev=334713&view=rev
Log:
[MC] Move MCAssembler::dump into the correct cpp file. NFC
Differential Revision: https://reviews.llvm.org/D46556
Modified:
llvm/trunk/lib/MC/MCAssembler.cpp
llvm/trunk/lib/MC/MCFragment.cpp
Modified: llvm/trunk/lib/MC/MCAssembler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAssembler.cpp?rev=334713&r1=334712&r2=334713&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCAssembler.cpp (original)
+++ llvm/trunk/lib/MC/MCAssembler.cpp Thu Jun 14 07:04:23 2018
@@ -1065,3 +1065,27 @@ void MCAssembler::finishLayout(MCAsmLayo
}
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
Modified: llvm/trunk/lib/MC/MCFragment.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCFragment.cpp?rev=334713&r1=334712&r2=334713&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCFragment.cpp (original)
+++ llvm/trunk/lib/MC/MCFragment.cpp Thu Jun 14 07:04:23 2018
@@ -465,26 +465,4 @@ LLVM_DUMP_METHOD void MCFragment::dump()
}
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
More information about the llvm-commits
mailing list