aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2018-02-24 00:40:50 +0000
committerHeejin Ahn <aheejin@gmail.com>2018-02-24 00:40:50 +0000
commit9386bde11b7f996e6ce7c69a288f896d0c6bb480 (patch)
treea4406330e610e69c97e33b958fee5f672c84cfb3 /llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
parentd99072bc9749874a7885740959e35ac08d99e324 (diff)
downloadllvm-9386bde11b7f996e6ce7c69a288f896d0c6bb480.zip
llvm-9386bde11b7f996e6ce7c69a288f896d0c6bb480.tar.gz
llvm-9386bde11b7f996e6ce7c69a288f896d0c6bb480.tar.bz2
[WebAssembly] Add exception handling option and feature
Summary: Add a llc command line option and WebAssembly architecture feature for exception handling. Reviewers: dschuff Subscribers: jfb, sbc100, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D43683 llvm-svn: 326004
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp')
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
index d38cde7..a686e77 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
@@ -190,7 +190,8 @@ void WebAssemblyPassConfig::addIRPasses() {
// blocks. Lowering invokes when there is no EH support is done in
// TargetPassConfig::addPassesToHandleExceptions, but this runs after this
// function and SjLj handling expects all invokes to be lowered before.
- if (!EnableEmException) {
+ if (!EnableEmException &&
+ TM->Options.ExceptionModel == ExceptionHandling::None) {
addPass(createLowerInvokePass());
// The lower invoke pass may create unreachable code. Remove it in order not
// to process dead blocks in setjmp/longjmp handling.