summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-10-29 14:25:43 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-10-29 14:25:43 +0000
commit54818dc7466861623971ebc793d8afe48bd58e4f (patch)
tree469deff139d3157baa1630dac20384af2531714c /tools
parentc777b2e58c0df1b8e7a8c0c8e78eb53d83549186 (diff)
downloadexternal_llvm-54818dc7466861623971ebc793d8afe48bd58e4f.zip
external_llvm-54818dc7466861623971ebc793d8afe48bd58e4f.tar.gz
external_llvm-54818dc7466861623971ebc793d8afe48bd58e4f.tar.bz2
Support names like llvm-ar-3.4 and llvm-ranlib-3.4.
They are used in some packages. For example: http://packages.ubuntu.com/saucy/i386/llvm-3.4/filelist This fixes pr17721. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193612 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r--tools/llvm-ar/llvm-ar.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/llvm-ar/llvm-ar.cpp b/tools/llvm-ar/llvm-ar.cpp
index e56e49ad..64ef3fa 100644
--- a/tools/llvm-ar/llvm-ar.cpp
+++ b/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!");
}