[PATCH] D18814: Implement --start-lib and --end-lib.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 7 12:30:53 PDT 2016


ruiu added a comment.

Submitted as r265710 with an additional test for bitcode input files.


================
Comment at: ELF/InputFiles.cpp:585
@@ +584,3 @@
+    StringRef StringTable = check(Obj.getStringTableForSymtab(Sec));
+    for (const Elf_Sym *I = Syms.begin() + FirstNonLocal, *E = Syms.end();
+         I != E; ++I)
----------------
rafael wrote:
> Can you use Syms.slice(FirstNonLocal)?
Done.

================
Comment at: ELF/InputFiles.cpp:599
@@ +598,3 @@
+  for (const BasicSymbolRef &Sym : Obj->symbols()) {
+    if (!(Sym.getFlags() & BasicSymbolRef::SF_Global))
+      continue;
----------------
rafael wrote:
> You probably want to use  BitcodeFile::shouldSkip.
Done.

================
Comment at: ELF/SymbolTable.h:90
@@ -89,3 +89,3 @@
   // The symbol table owns all file objects.
-  std::vector<std::unique_ptr<ArchiveFile>> ArchiveFiles;
+  std::vector<std::unique_ptr<InputFile>> ArchiveFiles;
   std::vector<std::unique_ptr<ObjectFile<ELFT>>> ObjectFiles;
----------------
rafael wrote:
> Why change this?
That was a mistake. Reverted.


http://reviews.llvm.org/D18814





More information about the llvm-commits mailing list