Simplify.

Now that we remember the StringRefs when they are first added, we can
write the table in any order.

llvm-svn: 259417
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index c65be55..f8f6215 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -1339,17 +1339,8 @@
     Sec->writeTo(Buf + Sec->getFileOff());
   }
 
-  // Write all sections but string table sections. We know the sizes of the
-  // string tables already, but they may not have actual strings yet (only
-  // room may be reserved), because writeTo() is allowed to add actual
-  // strings to the string tables.
   for (OutputSectionBase<ELFT> *Sec : OutputSections)
-    if (Sec != Out<ELFT>::Opd && Sec->getType() != SHT_STRTAB)
-      Sec->writeTo(Buf + Sec->getFileOff());
-
-  // Write string table sections.
-  for (OutputSectionBase<ELFT> *Sec : OutputSections)
-    if (Sec != Out<ELFT>::Opd && Sec->getType() == SHT_STRTAB)
+    if (Sec != Out<ELFT>::Opd)
       Sec->writeTo(Buf + Sec->getFileOff());
 }