diff options
Diffstat (limited to 'llvm/lib/MC/MCAssembler.cpp')
-rw-r--r-- | llvm/lib/MC/MCAssembler.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/llvm/lib/MC/MCAssembler.cpp b/llvm/lib/MC/MCAssembler.cpp index 3c77779..c8d12eb 100644 --- a/llvm/lib/MC/MCAssembler.cpp +++ b/llvm/lib/MC/MCAssembler.cpp @@ -1339,14 +1339,18 @@ LLVM_DUMP_METHOD void MCAssembler::dump() const{ OS << "<MCAssembler\n"; OS << " Sections:[\n "; - for (const_iterator it = begin(), ie = end(); it != ie; ++it) { - if (it != begin()) OS << ",\n "; - it->dump(); + bool First = true; + for (const MCSection &Sec : *this) { + if (First) + First = false; + else + OS << ",\n "; + Sec.dump(); } OS << "],\n"; OS << " Symbols:["; - bool First = true; + First = true; for (const MCSymbol &Sym : symbols()) { if (First) First = false; |