This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Add test for imported ctor and fix indexing bug found
ClosedPublic

Authored by ncw on Mar 9 2018, 2:44 PM.

Diff Detail

Repository
rLLD LLVM Linker

Event Timeline

ncw created this revision.Mar 9 2018, 2:44 PM
sbc100 accepted this revision.Mar 9 2018, 4:48 PM

Nice!

This revision is now accepted and ready to land.Mar 9 2018, 4:48 PM
sbc100 added inline comments.Mar 9 2018, 8:13 PM
wasm/Writer.cpp
664

Do the tests now check for this? (i.e. if you revert this part of the change will the test fail?)

Maybe be worth splitting this off as a separate bug fix?

ncw added inline comments.Mar 10 2018, 8:21 AM
wasm/Writer.cpp
664

Yes, the test change that's attached exercises the case where some globals and functions are interleaved in the import section.

The attached test change fails without this fix, hence bundling them together. Happy to land in two commits though - whatever you prefer.

Landing the together makes sense. LGTM.

This revision was automatically updated to reflect the committed changes.