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)
commit623c3d84898c81e4525ff0b9715233abd7c3bc14
tree4a9104798e80fb9e0601727645520b76f5274062
parente7de47efbec4f33a9d5e111e19eca14c5f79c19a
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.

llvm-svn: 186829
llvm/test/Object/archive-replace-pos.test
llvm/tools/llvm-ar/llvm-ar.cpp