]> granicus.if.org Git - clang/commit
[WebAssembly] Add -fwasm-exceptions for wasm EH
authorHeejin Ahn <aheejin@gmail.com>
Thu, 12 Sep 2019 04:01:37 +0000 (04:01 +0000)
committerHeejin Ahn <aheejin@gmail.com>
Thu, 12 Sep 2019 04:01:37 +0000 (04:01 +0000)
commited5c51707d766248bdc935fe333e3ac0739b10d7
tree27d8eeaedc065142003e44525362558b5953cec2
parent23a6eed24ca3cbe75d9173ca0272cac2d88578de
[WebAssembly] Add -fwasm-exceptions for wasm EH

Summary:
This adds `-fwasm-exceptions` (in similar fashion with
`-fdwarf-exceptions` or `-fsjlj-exceptions`) that turns on everything
with wasm exception handling from the frontend to the backend.

We currently have `-mexception-handling` in clang frontend, but this is
only about the architecture capability and does not turn on other
necessary options such as the exception model in the backend. (This can
be turned on with `llc -exception-model=wasm`, but llc is not invoked
separately as a command line tool, so this option has to be transferred
from clang.)

Turning on `-fwasm-exceptions` in clang also turns on
`-mexception-handling` if not specified, and will error out if
`-mno-exception-handling` is specified.

Reviewers: dschuff, tlively, sbc100

Subscribers: aprantl, jgravelle-google, sunfish, cfe-commits

Tags: #clang

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@371708 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/LangOptions.def
include/clang/Driver/Options.td
lib/CodeGen/BackendUtil.cpp
lib/CodeGen/CGException.cpp
lib/Driver/ToolChains/Clang.cpp
lib/Driver/ToolChains/WebAssembly.cpp
lib/Frontend/CompilerInvocation.cpp
test/CodeGenCXX/wasm-eh.cpp
test/Driver/wasm-toolchain.c