[WebAssembly] Refactor WebAssemblyLowerEmscriptenException pass for setjmp/longjmp
authorDerek Schuff <dschuff@google.com>
Thu, 18 Aug 2016 15:27:25 +0000 (15:27 +0000)
committerDerek Schuff <dschuff@google.com>
Thu, 18 Aug 2016 15:27:25 +0000 (15:27 +0000)
commitccdceda1282fa48f304e0cd0c1b6f6861be7dcd3
tree3fa7cd28e40ef1908073833b2025ee80cf0c33e6
parent1d0560b14dc214d108072057dfe7ab5d79bd7e67
[WebAssembly] Refactor WebAssemblyLowerEmscriptenException pass for setjmp/longjmp

This patch changes the code structure of
WebAssemblyLowerEmscriptenException pass to support both exception
handling and setjmp/longjmp. It also changes the name of the pass and
the source file.

1. Change the file/pass name to WebAssemblyLowerEmscriptenExceptions ->
WebAssemblyLowerEmscriptenEHSjLj to make it clear that it supports both
EH and SjLj
2. List function / global variable names at the top so they
can be changed easily
3. Some cosmetic changes

Patch by Heejin Ahn

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

llvm-svn: 279075
llvm/lib/Target/WebAssembly/CMakeLists.txt
llvm/lib/Target/WebAssembly/WebAssembly.h
llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp [moved from llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenExceptions.cpp with 66% similarity]
llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
llvm/test/CodeGen/WebAssembly/lower-em-exceptions-whitelist.ll
llvm/test/CodeGen/WebAssembly/lower-em-exceptions.ll