This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly][lld] --importTable flag only imports table if needed
ClosedPublic

Authored by wingo on Feb 17 2021, 8:21 AM.

Details

Summary

Before, --importTable forced the creation of an indirect function table,
whether it was needed or not. Now it only imports a table if needed.

Diff Detail

Event Timeline

wingo created this revision.Feb 17 2021, 8:21 AM
wingo requested review of this revision.Feb 17 2021, 8:21 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 17 2021, 8:21 AM
sbc100 accepted this revision.Feb 17 2021, 8:31 AM

Assuming all the tests pass this lgtm!

This revision is now accepted and ready to land.Feb 17 2021, 8:31 AM

I'm trying to think how this could effect either wasi-sdk or emscripten and I can't think of any ways.. but I will run the emscripten test suite with this change just in case.

sbc100 added inline comments.Feb 17 2021, 8:50 AM
lld/wasm/Driver.cpp
819

I'm seeing `Driver.cpp:802:21: warning: unused function 'createUndefinedIndirectFunctionTable' [-Wunused-function]
static TableSymbol *createUndefinedIndirectFunctionTable(StringRef name) {`

wingo updated this revision to Diff 324327.Feb 17 2021, 8:52 AM

Remove unused function

wingo marked an inline comment as done.Feb 17 2021, 8:53 AM
wingo added inline comments.
lld/wasm/Driver.cpp
819

Heh yeah, just fixed.

sbc100 accepted this revision.Feb 17 2021, 9:28 AM

Emscripten test suite passes. lgtm.

This revision was automatically updated to reflect the committed changes.
wingo marked an inline comment as done.