[PATCH] D40725: Wasm entrypoint changes #3 (add --no-entry argument to LLD)
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 7 14:09:44 PST 2017
ruiu accepted this revision.
ruiu added a comment.
LGTM
Thank you for making the change. As to the empty string handling, I wanted to make it consistent with other ports, and we in general don't write much code for edge cases to keep the code straightforward.
================
Comment at: wasm/Driver.cpp:326-327
if (!Config->Entry.empty()) {
- Symbol *Sym = Symtab->find(Config->Entry);
- if (!Sym->isFunction())
- fatal("entry point is not a function: " + Sym->getName());
+ if (!Symtab->find(Config->Entry)->isDefined())
+ error("entry point not found: " + Config->Entry);
----------------
You can combine these two `if`s.
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D40725
More information about the llvm-commits
mailing list