[llvm] r193612 - Support names like llvm-ar-3.4 and llvm-ranlib-3.4.
Rafael Espindola
rafael.espindola at gmail.com
Tue Oct 29 07:25:43 PDT 2013
Author: rafael
Date: Tue Oct 29 09:25:43 2013
New Revision: 193612
URL: http://llvm.org/viewvc/llvm-project?rev=193612&view=rev
Log:
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.
Modified:
llvm/trunk/tools/llvm-ar/llvm-ar.cpp
Modified: llvm/trunk/tools/llvm-ar/llvm-ar.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-ar/llvm-ar.cpp?rev=193612&r1=193611&r2=193612&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-ar/llvm-ar.cpp (original)
+++ llvm/trunk/tools/llvm-ar/llvm-ar.cpp Tue Oct 29 09:25:43 2013
@@ -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!");
}
More information about the llvm-commits
mailing list