[PATCH] D66848: [lld-link] implement -start-lib and -end-lib
Bob Haarman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 28 13:32:42 PDT 2019
inglorion added inline comments.
================
Comment at: lld/COFF/DebugTypes.cpp:234
- driver->enqueuePath(*p, false);
+ driver->enqueuePath(*p, LinkerDriver::AddMode::NORMAL);
}
----------------
ruiu wrote:
> `AddMode` is not an enum class, so it is in the namespace of `LinkerDriver`, so it can just be `LinkerDriver::NORMAL`
I had actually meant for this to be an enum class. Added the missing "class". Thanks!
================
Comment at: lld/COFF/Driver.cpp:1578-1581
+ enqueuePath(*path, inLib
+ ? AddMode::LAZY
+ : (isWholeArchive(*path) ? AddMode::WHOLE_ARCHIVE
+ : AddMode::NORMAL));
----------------
ruiu wrote:
> Too much nesting I guess? I'd write this way
>
> if (InLib)
> enqueuePath(*path, LAZY);
> else if (isWholeArchive(*Path))
> enqueuePath(*path, WHOLE_ARCHIVE);
> else
> enqueuePath(*path, NORMAL);
>
Thanks! That is much clearer.
================
Comment at: lld/COFF/InputFiles.h:133
+ explicit ObjFile(MemoryBufferRef m, std::vector<Symbol *> &&symbols)
+ : InputFile(ObjectKind, m), symbols(symbols) {}
static bool classof(const InputFile *f) { return f->kind() == ObjectKind; }
----------------
MaskRay wrote:
> `symbols(std::move(symbols))`
Thanks!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66848/new/
https://reviews.llvm.org/D66848
More information about the llvm-commits
mailing list