[llvm] r186197 - Change llvm-ar to use lib/Object.

Chandler Carruth chandlerc at google.com
Fri Jul 12 14:20:23 PDT 2013


On Fri, Jul 12, 2013 at 1:21 PM, Rafael Espindola <
rafael.espindola at gmail.com> wrote:

> Change llvm-ar to use lib/Object.
>
> This fixes two bugs is lib/Object that the use in llvm-ar found:
> * In OS X created archives, the name can be padded with nulls. Strip them.
> * In the constructor, remember the first non special member and use that in
>   begin_children. This makes sure we skip all special members, not just the
>   first one.
>
> The change to llvm-ar itself consist of
> * Using lib/Object for reading archives instead of ArchiveReader.cpp.
> * Writing the modified archive directly, instead of creating an in memory
>   representation.
>
> The old Archive library was way more general than what is needed, as can
> be seen by the diffstat of this patch.
>
> Having llvm-ar using lib/Object now opens the way for creating regular
> symbol
> tables for both native objects and bitcode files so that we can use those
> archives for LTO.
>

This is awesome. =D

Any chance you have performance numbers for binutils 'ar', old llvm-ar, and
lib/Object llvm-ar? I'd like to make sure we can use this new fancy 'ar'
tool without any issues even in non-LTO cases.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130712/1104d96f/attachment.html>


More information about the llvm-commits mailing list