summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-ar/llvm-ar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llvm-ar/llvm-ar.cpp')
-rw-r--r--llvm/tools/llvm-ar/llvm-ar.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/tools/llvm-ar/llvm-ar.cpp b/llvm/tools/llvm-ar/llvm-ar.cpp
index e56e49ad203..64ef3fa1bb9 100644
--- a/llvm/tools/llvm-ar/llvm-ar.cpp
+++ b/llvm/tools/llvm-ar/llvm-ar.cpp
@@ -877,9 +877,9 @@ int main(int argc, char **argv) {
);
StringRef Stem = sys::path::stem(ToolName);
- if (Stem.endswith("ar"))
+ if (Stem.find("ar") != StringRef::npos)
return ar_main(argv);
- if (Stem.endswith("ranlib"))
+ if (Stem.find("ranlib") != StringRef::npos)
return ranlib_main();
fail("Not ranlib or ar!");
}
OpenPOWER on IntegriCloud