[PATCH] D76562: [llvm-objcopy] Support llvm-strip-11 as argv[0]
Alexander Shaposhnikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 22 01:02:25 PDT 2020
alexshap added inline comments.
================
Comment at: llvm/tools/llvm-objcopy/llvm-objcopy.cpp:335
+ return I != StringRef::npos &&
+ (I + Tool.size() == Stem.size() || !isAlnum(Stem[I + Tool.size()]));
+ };
----------------
What would you think about smth like this:
const llvm::Regex StripRegex("^(llvm-)?strip(.*)$");
const llvm::Regex InstallNameToolRegex("^(llvm-)?install-name-tool(.*)$");
...
if (StripRegex.match(Tool))
...
else if (InstallNameToolRegex.match(Tool))
...
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