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

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 16 15:28:58 PDT 2018


sbc100 added inline comments.


================
Comment at: lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp:310
-const char *WebAssemblyLowerEmscriptenEHSjLj::SetThrewFName = "setThrew";
-const char *WebAssemblyLowerEmscriptenEHSjLj::SetTempRet0FName = "setTempRet0";
 const char *WebAssemblyLowerEmscriptenEHSjLj::EmLongjmpFName =
----------------
aheejin wrote:
> Why delete and inline these strings in code?
I find this pattern needlessly complex for single use strings.  At least in lld we try to avoid this.


================
Comment at: lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp:723
     Changed = true; // We have setjmp or longjmp somewhere
 
     // Register saveSetjmp function
----------------
aheejin wrote:
> What happens now with the new linker when malloc and free are not in the module?
If you don't include malloc/free (i.e. if you don't link with libc) and this pass adds references you will get "undefined symbol: malloc" at link time.  Seems reasonable?  


Repository:
  rL LLVM

https://reviews.llvm.org/D49263





More information about the llvm-commits mailing list