Commit Graph

4 Commits

Author SHA1 Message Date
Rafael Espindola 623c3d8489 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
2013-07-22 15:11:51 +00:00
Rafael Espindola 9cea44a5f2 Don't depend on a llvm-ar specific behavior.
GNU ar when not given the a or b modifiers replaces archive members in the
same location of the old ones. I am about to implement that in llvm-ar. For
now, just don't depend on the current llvm-ar behavior on this test.

llvm-svn: 186823
2013-07-22 12:41:04 +00:00
Rafael Espindola 9cd2435b9a Handle replacement into a position past the original member.
We were incorrectly computing where to insert a member if it was replacing
a previous member that was before the insert point.

llvm-svn: 186792
2013-07-21 12:58:07 +00:00
Rafael Espindola fcc3a1a93f Fix inserting new elements in a specified location.
We were only handling the 'a' and 'b' options during moves before.

llvm-svn: 186721
2013-07-19 21:23:28 +00:00