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
This commit is contained in:
Rafael Espindola 2013-10-29 14:25:43 +00:00
parent c777b2e58c
commit 54818dc746

View File

@ -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!");
}