[lld] c0b986a - [ELF] Remove make<std::unique_ptr<MemoryBuffer>>. NFC
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 29 23:35:22 PST 2022
Author: Fangrui Song
Date: 2022-01-29T23:35:15-08:00
New Revision: c0b986aa0c4d40c2ff3c750ede33da9f23c1d734
URL: https://github.com/llvm/llvm-project/commit/c0b986aa0c4d40c2ff3c750ede33da9f23c1d734
DIFF: https://github.com/llvm/llvm-project/commit/c0b986aa0c4d40c2ff3c750ede33da9f23c1d734.diff
LOG: [ELF] Remove make<std::unique_ptr<MemoryBuffer>>. NFC
Added:
Modified:
lld/ELF/Driver.cpp
Removed:
################################################################################
diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp
index 46fc67a609b1..4aae70d08018 100644
--- a/lld/ELF/Driver.cpp
+++ b/lld/ELF/Driver.cpp
@@ -196,8 +196,8 @@ std::vector<std::pair<MemoryBufferRef, uint64_t>> static getArchiveMembers(
toString(std::move(err)));
// Take ownership of memory buffers created for members of thin archives.
- for (std::unique_ptr<MemoryBuffer> &mb : file->takeThinBuffers())
- make<std::unique_ptr<MemoryBuffer>>(std::move(mb));
+ std::vector<std::unique_ptr<MemoryBuffer>> mbs = file->takeThinBuffers();
+ std::move(mbs.begin(), mbs.end(), std::back_inserter(memoryBuffers));
return v;
}
More information about the llvm-commits
mailing list