[PATCH] D65759: [ELF][ARM] Fix /DISCARD/ of section with .ARM.exidx section

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 6 00:16:17 PDT 2019


grimar added inline comments.


================
Comment at: ELF/SyntheticSections.cpp:3212
+    auto isDiscarded = [](const InputSection *isec) { return !isec->isLive(); };
+    executableSections.erase(std::remove_if(executableSections.begin(),
+                                            executableSections.end(),
----------------
MaskRay wrote:
> `std::remove_if(excutableSections.begin(), excutableSections.end(), ...)` -> `llvm::remove_if(excutableSections, ...)`
The following should work here (and below):
`llvm::erase_if(executableSections, isDiscarded);`


================
Comment at: test/ELF/arm-exidx-partial-discard.s:6
+// RUN: llvm-readobj --sections %t.elf | FileCheck %s
+// RUN: llvm-readobj -x .ARM.exidx %t.elf | FileCheck --check-prefix=CHECK-HEX %s
+
----------------
Seems you could combine this `llvm-readobj` calls?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65759/new/

https://reviews.llvm.org/D65759





More information about the llvm-commits mailing list