[WebAssembly] Fix bugs in WebAssemblyLowerEmscriptenExceptions pass
authorDerek Schuff <dschuff@google.com>
Tue, 9 Aug 2016 00:29:55 +0000 (00:29 +0000)
committerDerek Schuff <dschuff@google.com>
Tue, 9 Aug 2016 00:29:55 +0000 (00:29 +0000)
commit53b9af02c8437c03508f5fb34d5902352300bf9a
treeeb28ecc85b9578f8bebcc399ffa041b2be17cfce
parent5f6ec06f17a844a16d3c08f111d30e9d85759b4b
[WebAssembly] Fix bugs in WebAssemblyLowerEmscriptenExceptions pass

* Delete extra '_' prefixes from JS library function names. fixImports()
  function in JS glue code deals with this for wasm.
* Change command-line option names in order to be consistent with
  asm.js.
* Add missing lowering code for llvm.eh.typeid.for intrinsics
* Delete commas in mangled function names
* Fix a function argument attributes bug. Because we add the pointer to
  the original callee as the first argument of invoke wrapper, all
  argument attribute indices have to be incremented by one.

Patch by Heejin Ahn

Differential Revision: https://reviews.llvm.org/D23258

llvm-svn: 278081
llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenExceptions.cpp
llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
llvm/test/CodeGen/WebAssembly/lower-em-exceptions.ll