aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/WebAssembly/WebAssembly.h
diff options
context:
space:
mode:
authorDerek Schuff <dschuff@google.com>2016-08-01 21:34:04 +0000
committerDerek Schuff <dschuff@google.com>2016-08-01 21:34:04 +0000
commitf41f67d3d91ca7aea611fd6eb4dc11d32ff677d5 (patch)
tree415db41f5891d4c73bde4d6a2b89c2e031758676 /llvm/lib/Target/WebAssembly/WebAssembly.h
parent4a7130a8fb77e45f3e597a132a539ac323ac6a34 (diff)
downloadllvm-f41f67d3d91ca7aea611fd6eb4dc11d32ff677d5.zip
llvm-f41f67d3d91ca7aea611fd6eb4dc11d32ff677d5.tar.gz
llvm-f41f67d3d91ca7aea611fd6eb4dc11d32ff677d5.tar.bz2
[WebAssembly] Add asm.js-style exception handling support
Summary: This patch includes asm.js-style exception handling support for WebAssembly. The WebAssembly MVP does not have any support for unwinding or non-local control flow. In order to support C++ exceptions, emscripten currently uses JavaScript exceptions along with some support code (written in JavaScript) that is bundled by emscripten with the generated code. This scheme lowers exception-related instructions for wasm such that wasm modules can be compatible with emscripten's existing scheme and share the support code. Patch by Heejin Ahn Differential Revision: https://reviews.llvm.org/D22958 llvm-svn: 277391
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssembly.h')
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssembly.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssembly.h b/llvm/lib/Target/WebAssembly/WebAssembly.h
index 957f31c..e3c7b42 100644
--- a/llvm/lib/Target/WebAssembly/WebAssembly.h
+++ b/llvm/lib/Target/WebAssembly/WebAssembly.h
@@ -16,14 +16,18 @@
#ifndef LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLY_H
#define LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLY_H
+#include "llvm/PassRegistry.h"
#include "llvm/Support/CodeGen.h"
namespace llvm {
class WebAssemblyTargetMachine;
+class ModulePass;
class FunctionPass;
// LLVM IR passes.
+ModulePass *createWebAssemblyLowerEmscriptenExceptions();
+void initializeWebAssemblyLowerEmscriptenExceptionsPass(PassRegistry &);
FunctionPass *createWebAssemblyOptimizeReturned();
// ISel and immediate followup passes.