[PATCH] D27716: [ELF] - Implemented --retain-symbols-file option
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 16 00:08:21 PST 2016
ruiu added inline comments.
================
Comment at: ELF/Driver.cpp:480-483
+ std::transform(Arr.begin(), Arr.end(), Arr.begin(),
+ [](StringRef S) { return S.trim(); });
+ Arr.erase(std::remove_if(Arr.begin(), Arr.end(),
+ [](StringRef S) { return S.empty(); }),
----------------
I think plain, boring, non-higher-order code is easier to read.
for (StringRef S : Arr) {
S = S.trim();
if (!S.empty())
Res.push_back(S);
}
https://reviews.llvm.org/D27716
More information about the llvm-commits
mailing list