[PATCH] D18814: Implement --start-lib and --end-lib.
Rafael Ávila de Espíndola via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 7 11:09:48 PDT 2016
rafael accepted this revision.
rafael added a reviewer: rafael.
rafael added a comment.
This revision is now accepted and ready to land.
This is looking really nice. If needed we can try optimizing not parsing symbols twice in the future.
LGTM with some nits and a bitcode test added.
================
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)
----------------
Can you use Syms.slice(FirstNonLocal)?
================
Comment at: ELF/InputFiles.cpp:599
@@ +598,3 @@
+ for (const BasicSymbolRef &Sym : Obj->symbols()) {
+ if (!(Sym.getFlags() & BasicSymbolRef::SF_Global))
+ continue;
----------------
You probably want to use BitcodeFile::shouldSkip.
================
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;
----------------
Why change this?
http://reviews.llvm.org/D18814
More information about the llvm-commits
mailing list