Turn MCSectionData into a field of MCSection.

This also changes MCAssembler to store a vector of MCSections instead of an
iplist of MCSectionData.

llvm-svn: 238159
diff --git a/llvm/lib/MC/ELFObjectWriter.cpp b/llvm/lib/MC/ELFObjectWriter.cpp
index a211dcf..6dd8bd7 100644
--- a/llvm/lib/MC/ELFObjectWriter.cpp
+++ b/llvm/lib/MC/ELFObjectWriter.cpp
@@ -1348,8 +1348,9 @@
   SectionOffsetsTy SectionOffsets;
   std::vector<MCSectionELF *> Groups;
   std::vector<MCSectionELF *> Relocations;
-  for (const MCSectionData &SD : Asm) {
-    const MCSectionELF &Section = static_cast<MCSectionELF &>(SD.getSection());
+  for (const MCSection &Sec : Asm) {
+    const MCSectionELF &Section = static_cast<const MCSectionELF &>(Sec);
+    const MCSectionData &SD = Section.getSectionData();
 
     uint64_t Padding = OffsetToAlignment(OS.tell(), Section.getAlignment());
     WriteZeros(Padding);