[llvm-ar] Fix when llvm-ar fails to replace existing members when updating a thin...
authorgbreynoo <owen.reynolds@sony.com>
Fri, 18 Nov 2022 14:37:56 +0000 (14:37 +0000)
committergbreynoo <owen.reynolds@sony.com>
Fri, 18 Nov 2022 14:37:56 +0000 (14:37 +0000)
commitdcbf61b3520ed7157688a269ad4dfa8545a00f79
tree15d916c890cf64c2f48fc8cba6e1fcd38b4d1e91
parent2e02f007a27310abaea60f7749093c95e61c813a
[llvm-ar] Fix when llvm-ar fails to replace existing members when updating a thin archive

As seen in https://github.com/llvm/llvm-project/issues/55023 when a thin
archive is updated when not in the CWD, replacement does not work as
expected. This change fixes the relative file path comparison so the
correct files are updated.

Differential Revision: https://reviews.llvm.org/D138218
llvm/test/tools/llvm-ar/thin-archive-relative-path.test [new file with mode: 0644]
llvm/tools/llvm-ar/llvm-ar.cpp