[PATCH] D32721: Accept archive files with no symbol table instad of warning on them.

Rafael Ávila de Espíndola via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 2 13:49:52 PDT 2017


rafael added a comment.

I think this should probably be OK with the inline nits fixed.



================
Comment at: lld/ELF/Driver.cpp:193
+    // we'll handle it as if it had a symbol table.
+    if (!hasSymbolTable(MBRef)) {
+      for (MemoryBufferRef MB : getArchiveMembers(MBRef))
----------------
Can you call Archive::create(MB) only once and pass that to the ArchiveFile constructor?


================
Comment at: lld/ELF/Driver.cpp:195
+      for (MemoryBufferRef MB : getArchiveMembers(MBRef))
+        Files.push_back(make<LazyObjectFile>(MB));
+      return;
----------------
Please warn if we add any files in here. That means that the archive really should have had a symbol table.


https://reviews.llvm.org/D32721





More information about the llvm-commits mailing list