[PATCH] D66848: [lld-link] implement -start-lib and -end-lib
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 28 01:27:18 PDT 2019
ruiu added inline comments.
================
Comment at: lld/COFF/DebugTypes.cpp:234
- driver->enqueuePath(*p, false);
+ driver->enqueuePath(*p, LinkerDriver::AddMode::NORMAL);
}
----------------
`AddMode` is not an enum class, so it is in the namespace of `LinkerDriver`, so it can just be `LinkerDriver::NORMAL`
================
Comment at: lld/COFF/Driver.cpp:1578-1581
+ enqueuePath(*path, inLib
+ ? AddMode::LAZY
+ : (isWholeArchive(*path) ? AddMode::WHOLE_ARCHIVE
+ : AddMode::NORMAL));
----------------
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);
================
Comment at: lld/COFF/Driver.cpp:1594
if (Optional<StringRef> path = findLib(arg->getValue()))
- enqueuePath(*path, false);
+ enqueuePath(*path, AddMode::NORMAL);
----------------
I think you can omit `AddMode::`.
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