[PATCH] D49263: [WebAssembly] Update WebAssemblyLowerEmscriptenEHSjLj to handle separate compilation

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 12 11:59:39 PDT 2018


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

Previously we were assuming whole program compilation. Now that
seperate compilation is thing we need to update this pass.
Firstly, it can no longer assert on the existence of malloc and free.
This functions might not be in the current translation unit.  If we
need them then we will generate not imports for them.

Secondly the global helper function we create should be marked as
weak since we will be generating a separate copy in each translation
unit.

Finally the names of the symbols used must be unique and fixed since
they need to agree across translation units.


Repository:
  rL LLVM

https://reviews.llvm.org/D49263

Files:
  lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp
  test/CodeGen/WebAssembly/lower-em-exceptions.ll
  test/CodeGen/WebAssembly/lower-em-sjlj.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49263.155247.patch
Type: text/x-patch
Size: 7852 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180712/66c486a7/attachment.bin>


More information about the llvm-commits mailing list