Skip to content

Commit

Permalink
Fix name matching to work on windows.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189517 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
espindola committed Aug 28, 2013
1 parent b5011bd commit 98b5be8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tools/llvm-ar/llvm-ar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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!");
}
Expand Down

0 comments on commit 98b5be8

Please sign in to comment.