forked from OSchip/llvm-project
[ELF] Simplify addFile. NFC
This commit is contained in:
parent
2d2737667e
commit
c171250e38
|
@ -239,8 +239,9 @@ void LinkerDriver::addFile(StringRef path, bool withLOption) {
|
|||
readLinkerScript(mbref);
|
||||
return;
|
||||
case file_magic::archive: {
|
||||
auto members = getArchiveMembers(mbref);
|
||||
if (inWholeArchive) {
|
||||
for (const auto &p : getArchiveMembers(mbref)) {
|
||||
for (const std::pair<MemoryBufferRef, uint64_t> &p : members) {
|
||||
if (isBitcode(p.first))
|
||||
files.push_back(make<BitcodeFile>(p.first, path, p.second, false));
|
||||
else
|
||||
|
@ -249,7 +250,6 @@ void LinkerDriver::addFile(StringRef path, bool withLOption) {
|
|||
return;
|
||||
}
|
||||
|
||||
auto members = getArchiveMembers(mbref);
|
||||
archiveFiles.emplace_back(path, members.size());
|
||||
|
||||
// Handle archives and --start-lib/--end-lib using the same code path. This
|
||||
|
|
Loading…
Reference in New Issue