[PATCH] D76562: [llvm-objcopy] Support llvm-strip-11 as argv[0]
Alex Brachet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 22 00:30:16 PDT 2020
abrachet added inline comments.
================
Comment at: llvm/tools/llvm-objcopy/llvm-objcopy.cpp:332
+ StringRef Stem = sys::path::stem(ToolName);
+ auto Is = [&](StringRef Tool) {
+ auto I = Stem.rfind_lower(Tool);
----------------
`StringRef` is small enough that its probably faster to capture by value, no?
================
Comment at: llvm/tools/llvm-objcopy/llvm-objcopy.cpp:333
+ auto Is = [&](StringRef Tool) {
+ auto I = Stem.rfind_lower(Tool);
+ return I != StringRef::npos &&
----------------
Might as well just explicitly use `size_t`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76562/new/
https://reviews.llvm.org/D76562
More information about the llvm-commits
mailing list