[PATCH] D81109: llvm-link: Add support for archive files as inputs.
Alexey Bataev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 12 09:45:25 PDT 2020
ABataev added inline comments.
================
Comment at: llvm/tools/llvm-link/llvm-link.cpp:143
+static std::unique_ptr<Module> loadArFile(const char *argv0,
+ const std::string ArchiveName,
----------------
`Argv0`. Also, better to use `StringRef`, if possible
================
Comment at: llvm/tools/llvm-link/llvm-link.cpp:144
+static std::unique_ptr<Module> loadArFile(const char *argv0,
+ const std::string ArchiveName,
+ LLVMContext &Context, Linker &L,
----------------
`const std::string &`
================
Comment at: llvm/tools/llvm-link/llvm-link.cpp:157
+ ExitOnErr(std::move(Err));
+ for (auto &C : Archive.children(Err)) {
+ auto Ename = C.getName();
----------------
Better to use the real type here rather than `auto`
================
Comment at: llvm/tools/llvm-link/llvm-link.cpp:158-159
+ for (auto &C : Archive.children(Err)) {
+ auto Ename = C.getName();
+ if (auto E = Ename.takeError()) {
+ errs() << argv0 << ": ";
----------------
Same here about `auto`s
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81109/new/
https://reviews.llvm.org/D81109
More information about the llvm-commits
mailing list