[llvm] r189517 - Fix name matching to work on windows.
Rafael Espindola
rafael.espindola at gmail.com
Wed Aug 28 14:00:03 PDT 2013
Author: rafael
Date: Wed Aug 28 16:00:03 2013
New Revision: 189517
URL: http://llvm.org/viewvc/llvm-project?rev=189517&view=rev
Log:
Fix name matching to work on windows.
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=189517&r1=189516&r2=189517&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-ar/llvm-ar.cpp (original)
+++ llvm/trunk/tools/llvm-ar/llvm-ar.cpp Wed Aug 28 16:00:03 2013
@@ -876,9 +876,10 @@ int main(int argc, char **argv) {
" This program archives bitcode files into single libraries\n"
);
- if (ToolName.endswith("ar"))
+ StringRef Stem = sys::path::stem(ToolName);
+ if (Stem.endswith("ar"))
return ar_main(argv);
- if (ToolName.endswith("ranlib"))
+ if (Stem.endswith("ranlib"))
return ranlib_main();
fail("Not ranlib or ar!");
}
More information about the llvm-commits
mailing list