This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Don't load weak undefined symbols from archive files
ClosedPublic

Authored by sbc100 on Jan 28 2019, 9:44 PM.

Event Timeline

sbc100 created this revision.Jan 28 2019, 9:44 PM
sbc100 added a reviewer: ruiu.Jan 28 2019, 9:46 PM
ruiu added inline comments.Jan 29 2019, 11:26 AM
wasm/Driver.cpp
314

Is this the same as isa<FunctionSYmbol>(Sym) || isa<LazySymbol>(Sym)? Looks like Sig can be nullptr if Lazy, but I don't understand what's that case.

wasm/SymbolTable.cpp
396

auto* -> auto *

sbc100 updated this revision to Diff 184154.Jan 29 2019, 12:27 PM
sbc100 marked an inline comment as done.
  • clang format
sbc100 added inline comments.Jan 29 2019, 12:28 PM
wasm/Driver.cpp
314

Yes, the LazySymbol might not be function at all. It might be a data symbol in which case it won't have a signature.

ruiu accepted this revision.Jan 29 2019, 1:40 PM

LGTM

wasm/Driver.cpp
314

Ah, got it. I'd add a brief comment saying that if Sig is null, that means Sym was not a function.

This revision is now accepted and ready to land.Jan 29 2019, 1:40 PM
This revision was automatically updated to reflect the committed changes.