[PATCH] D49678: [llvm-objcopy] Adding support for compressed DWARF debug sections.
Puyan Lotfi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 29 14:10:12 PDT 2018
plotfi added inline comments.
================
Comment at: tools/llvm-objcopy/llvm-objcopy.cpp:417
+ SmallVector<SectionBase *, 13> SectionsToRemove;
+ std::for_each(Obj.sections().begin(), Obj.sections().end(),
+ [&SectionsToRemove](SectionBase &Section) {
----------------
plotfi wrote:
> jhenderson wrote:
> > Use std::copy_if and std::back_inserter to do this. It looks a bit cleaner, in my opinion.
> I agree, except this is not easy to do because Obj.sections() are unique_ptrs. I could use a move_iterator but we use RemovePreds to remove items from the sections vector.
I think ideally we'd want a transform_if but that doesn't exist.
Repository:
rL LLVM
https://reviews.llvm.org/D49678
More information about the llvm-commits
mailing list