1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 12:41:49 +01:00

Fix name matching to work on windows.

llvm-svn: 189517
This commit is contained in:
Rafael Espindola 2013-08-28 21:00:03 +00:00
parent f0211121f3
commit a44903bdb6

View File

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