[llvm-ar] Accept file paths with windows format slashes
authorOwen Reynolds <gbreynoo@gmail.com>
Mon, 12 Aug 2019 14:00:28 +0000 (14:00 +0000)
committerOwen Reynolds <gbreynoo@gmail.com>
Mon, 12 Aug 2019 14:00:28 +0000 (14:00 +0000)
commit47298393d2e4d35480d37b0afdea3e899dc798e2
tree6e0a361043e95950771acd4706c0754802558969
parentfee242aed415458fa89eaaa0e4ae8a887bd8c874
[llvm-ar] Accept file paths with windows format slashes

The internal representation of llvm-ar archives uses linux style slashes
for paths, no matter the OS. In the case of windows this meant file
paths input intending to match existing members would only match if
linux style slashes where used. This change allows either slash
direction to be input by the user.

This change includes removing an unnecessary call to normalisePath and
moving the call of another.

Differential Revision: https://reviews.llvm.org/D65743

llvm-svn: 368573
llvm/test/tools/llvm-ar/windows-path.test [new file with mode: 0644]
llvm/tools/llvm-ar/llvm-ar.cpp