[PATCH] D47162: [WebAssembly] Initial support for LTO
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 21 14:30:28 PDT 2018
ruiu added inline comments.
================
Comment at: wasm/Driver.cpp:326
+ // Parse LTO plugin-related options for compatibility with gold.
+ for (auto *Arg : Args.filtered(OPT_plugin_opt)) {
----------------
ELF lld supports --thinlto-jobs=, --lto-partitions=, etc as well as --plugin-opt=jobs=, --plugin-opt=partitions=, etc for compatibility with the LTO plugin for GNU gold. Since you are creating a new linker from scratch now, I don't think that makes sense to keep --plugin-opt options. I'd use only non-"--plugin-opt=" options.
================
Comment at: wasm/InputFiles.cpp:378
+ if (ObjSym.isExecutable())
+ return Symtab->addUndefinedFunction(NameRef, 0, &F, nullptr);
+ else
----------------
No `else` after `return`
================
Comment at: wasm/InputFiles.h:73
MemoryBufferRef MB;
+ // List of all symbols referenced or defined by this file.
+ std::vector<Symbol *> Symbols;
----------------
nit: add a blank line before a comment.
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D47162
More information about the llvm-commits
mailing list