Skip to content
  • Rui Ueyama's avatar
    9b09369b
    Simplify --whole-archive handling. · 9b09369b
    Rui Ueyama authored
    Previously, we handle archive files with --whole-archive this way:
    create instances of ArchiveFile, call getMembers to obtain memory
    buffers of archive members, and create ObjectFiles for the members.
    We didn't call anything except getMembers if --whole-archive was
    specified.
    
    I noticed that we didn't actually have to create ArchiveFile instaces
    at all for that case. All we need is to get a list of memory buffers
    for members, which can be done by a non-member function.
    
    This patch removes getMembers member function from ArchiveFile.
    Also removed unnecessary code for memory management.
    
    llvm-svn: 256893
    9b09369b
    Simplify --whole-archive handling.
    Rui Ueyama authored
    Previously, we handle archive files with --whole-archive this way:
    create instances of ArchiveFile, call getMembers to obtain memory
    buffers of archive members, and create ObjectFiles for the members.
    We didn't call anything except getMembers if --whole-archive was
    specified.
    
    I noticed that we didn't actually have to create ArchiveFile instaces
    at all for that case. All we need is to get a list of memory buffers
    for members, which can be done by a non-member function.
    
    This patch removes getMembers member function from ArchiveFile.
    Also removed unnecessary code for memory management.
    
    llvm-svn: 256893
Loading