diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2016-02-01 21:52:00 +0000 | 
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2016-02-01 21:52:00 +0000 | 
| commit | 4d91f7fc259b1ca1f9a6e9b38d2f667e407481b3 (patch) | |
| tree | b63656462d05ddf8af44f9a6853b491c221222b5 | |
| parent | e9848d4a8873d68d68bd444c944d42be9a92ef24 (diff) | |
| download | bcm5719-llvm-4d91f7fc259b1ca1f9a6e9b38d2f667e407481b3.tar.gz bcm5719-llvm-4d91f7fc259b1ca1f9a6e9b38d2f667e407481b3.zip  | |
Simplify.
Now that we remember the StringRefs when they are first added, we can
write the table in any order.
llvm-svn: 259417
| -rw-r--r-- | lld/ELF/Writer.cpp | 11 | 
1 files changed, 1 insertions, 10 deletions
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index c65be556ba1..f8f6215003b 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -1339,17 +1339,8 @@ template <class ELFT> void Writer<ELFT>::writeSections() {      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());  }  | 

