mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
[llvm-strip] Check "strip" with StringRef::contains instead of ends_with
Summary: If argv[0] is version suffixed, e.g. llvm-strip-7, this will still work. Reviewers: rupprecht, jhenderson, alexshap, jakehehrlich Reviewed By: rupprecht Subscribers: alexshap, jakehehrlich, llvm-commits Differential Revision: https://reviews.llvm.org/D54193 llvm-svn: 346292
This commit is contained in:
parent
075bb2a339
commit
6656cc18c1
@ -219,7 +219,7 @@ int main(int argc, char **argv) {
|
||||
InitLLVM X(argc, argv);
|
||||
ToolName = argv[0];
|
||||
DriverConfig DriverConfig;
|
||||
if (sys::path::stem(ToolName).endswith_lower("strip"))
|
||||
if (sys::path::stem(ToolName).contains("strip"))
|
||||
DriverConfig = parseStripOptions(makeArrayRef(argv + 1, argc));
|
||||
else
|
||||
DriverConfig = parseObjcopyOptions(makeArrayRef(argv + 1, argc));
|
||||
|
Loading…
Reference in New Issue
Block a user