summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2017-06-30 00:43:15 +0000
committerHeejin Ahn <aheejin@gmail.com>2017-06-30 00:43:15 +0000
commitac62b05d055632d849cbf48dfc2fbc423c85f87e (patch)
treec9ed58744c502fc83bb4c853267f621b68f1a9e5 /llvm/include
parent48bccc9448237a9fa6c7f694137d3d2490e725c7 (diff)
downloadbcm5719-llvm-ac62b05d055632d849cbf48dfc2fbc423c85f87e.tar.gz
bcm5719-llvm-ac62b05d055632d849cbf48dfc2fbc423c85f87e.zip
[WebAssembly] Add support for exception handling instructions
Summary: This adds backend support for throw, rethrow, try, and try_end instructions. This needs the corresponding clang builtin support: https://reviews.llvm.org/D34783 This follows the Wasm exception handling proposal in https://github.com/WebAssembly/exception-handling/blob/master/proposals/Exceptions.md Reviewers: sunfish, dschuff Reviewed By: dschuff Subscribers: jfb, sbc100, jgravelle-google Differential Revision: https://reviews.llvm.org/D34826 llvm-svn: 306774
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/IR/IntrinsicsWebAssembly.td4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/include/llvm/IR/IntrinsicsWebAssembly.td b/llvm/include/llvm/IR/IntrinsicsWebAssembly.td
index 3a0957dfa39..640ef627bc4 100644
--- a/llvm/include/llvm/IR/IntrinsicsWebAssembly.td
+++ b/llvm/include/llvm/IR/IntrinsicsWebAssembly.td
@@ -19,4 +19,8 @@ let TargetPrefix = "wasm" in { // All intrinsics start with "llvm.wasm.".
def int_wasm_current_memory : Intrinsic<[llvm_anyint_ty], [], [IntrReadMem]>;
def int_wasm_grow_memory : Intrinsic<[llvm_anyint_ty], [LLVMMatchType<0>], []>;
+// Exception handling intrinsics
+def int_wasm_throw: Intrinsic<[], [llvm_i32_ty, llvm_ptr_ty], [Throws]>;
+def int_wasm_rethrow: Intrinsic<[], [], [Throws]>;
+
}
OpenPOWER on IntegriCloud