[llvm-ar] Fix thin archive being wrongly converted to a full archive
authorgbreynoo <Owen.Reynolds@sony.com>
Thu, 21 Apr 2022 14:48:26 +0000 (15:48 +0100)
committergbreynoo <Owen.Reynolds@sony.com>
Thu, 21 Apr 2022 14:48:26 +0000 (15:48 +0100)
commit1f71b5a38605a4f101af43288ae22feb89c8a469
treec0c239367d0ae1a9c4c94e5321f4a4c4b23bd77d
parent30f22429d38944e126db75296a1ffc6c12c7b87a
[llvm-ar] Fix thin archive being wrongly converted to a full archive

When using the L option to quick append a full archive to a thin
archive, the thin archive was being wrongly converted to a full archive.
I've fixed the issue and added a check for it in
thin-to-full-archive.test and expanded some tests.

Differential Revision: https://reviews.llvm.org/D123142
llvm/test/tools/llvm-ar/flatten-thin-archive.test
llvm/test/tools/llvm-ar/regular-to-thin-archive.test
llvm/test/tools/llvm-ar/thin-to-regular-archive.test
llvm/tools/llvm-ar/llvm-ar.cpp