Replace archive members in the old position.
authorRafael Espindola <rafael.espindola@gmail.com>
Mon, 22 Jul 2013 15:11:51 +0000 (15:11 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Mon, 22 Jul 2013 15:11:51 +0000 (15:11 +0000)
commit51392a079e3285303fe815672b3db6b4cf903231
tree38f9e498ed329ebaa2af3a329ab85d4f48756030
parentbb8234b7ff932e371ca11a4cb725b51958bf597d
Replace archive members in the old position.

This matches gnu archive behavior and since archive member order can change
which member is used, not changing the order on replacement looks like the
right thing to do.

This patch also refactors the logic for which archive member to keep and
whether to move it to a helper function (computeInsertAction). The
nesting in computeNewArchiveMembers was getting a bit confusing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186829 91177308-0d34-0410-b5e6-96231b3b80d8
test/Object/archive-replace-pos.test
tools/llvm-ar/llvm-ar.cpp