[PATCH] D41277: Implement --just-symbols
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 15 16:31:19 PST 2017
ruiu added a comment.
Sorry I missed this one.
================
Comment at: ELF/Driver.cpp:183
+ if (JustSymbols) {
+ Files.push_back(createJustSymbolsFile(MBRef));
----------------
You can just call `Files.push_back(createJustSymbolsFile(MBRef))` instead of calling `addFile`.
================
Comment at: ELF/Driver.h:30
void main(ArrayRef<const char *> Args, bool CanExitEarly);
- void addFile(StringRef Path, bool WithLOption);
+ void addFile(StringRef Path, bool WithLOption, bool JustSymbols = false);
void addLibrary(StringRef Name);
----------------
I don't like an optional argument in general. Please avoid using it in lld.
================
Comment at: ELF/InputFiles.h:337
+ static bool classof(const InputFile *F) {
+ return F->kind() == InputFile::JustSymbolsKind;
+ }
----------------
Remove `InputFile::`.
================
Comment at: ELF/SymbolTable.cpp:77
+ if (auto *F = dyn_cast<JustSymbolsFile<ELFT>>(File)) {
+ F->parse();
----------------
Obviously you need a comment just like other code blocks.
https://reviews.llvm.org/D41277
More information about the llvm-commits
mailing list