[PATCH] D37520: [ELF] - Fix removing of unused synthetic sections.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 11 03:56:31 PDT 2017


grimar added inline comments.


================
Comment at: ELF/Writer.cpp:1205-1208
+    for (BaseCommand *B : OS->Commands)
+      if (auto *ISD = dyn_cast<InputSectionDescription>(B))
         llvm::erase_if(ISD->Sections,
                        [=](InputSection *IS) { return IS == SS; });
----------------
ruiu wrote:
> This code still looks odd. Can SS belong to more than one OS->Commands?
No. That was just short way to write the code. Rewrote this place to longer, but more straightforward way,
do you prefer new way more ?


https://reviews.llvm.org/D37520





More information about the llvm-commits mailing list