[PATCH] D18669: ELF: Correctly handle --whole-archive for thin archives.Depends on D18664Depends on D18666

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 31 13:03:18 PDT 2016


ruiu added inline comments.

================
Comment at: ELF/Driver.cpp:72-74
@@ -71,3 +71,5 @@
 // Each slice consists of a member file in the archive.
-static std::vector<MemoryBufferRef> getArchiveMembers(MemoryBufferRef MB) {
+static std::vector<MemoryBufferRef>
+getArchiveMembers(MemoryBufferRef MB,
+                  std::vector<std::unique_ptr<MemoryBuffer>> &OwningMBs) {
   std::unique_ptr<Archive> File =
----------------
Please make this a member function of LinkerDriver and remove OwningMBs parameter.

================
Comment at: ELF/Driver.cpp:89-90
@@ +88,4 @@
+
+  for (std::unique_ptr<MemoryBuffer> &MB : File->takeThinBuffers())
+    OwningMBs.push_back(std::move(MB));
+
----------------
Add a comment.


http://reviews.llvm.org/D18669





More information about the llvm-commits mailing list