[PATCH] D62240: [WebAssembly] Seal imports section before counting imports

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 22 03:35:47 PDT 2019


sbc100 created this revision.
Herald added subscribers: llvm-commits, sunfish, aheejin, jgravelle-google, dschuff.
Herald added a project: LLVM.

Before we can assign entries in the function of global index space
we need to know the total number of function and global imports
respectively.

To avoid programmer error this change seals that imports section before
assigned function and global index space.  Any attempt to add an import
after the section is sealed will assert.

The lack this such as check caused  https://reviews.llvm.org/D61876
to be reverted.  I'm also trying to craft a test case the this
failure.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D62240

Files:
  lld/wasm/SyntheticSections.cpp
  lld/wasm/SyntheticSections.h
  lld/wasm/Writer.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62240.200687.patch
Type: text/x-patch
Size: 4865 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190522/268e7a1a/attachment.bin>


More information about the llvm-commits mailing list