summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/wasm-eh.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [WebAssembly] Delete duplicate REQUIRES lineHeejin Ahn2019-09-121-1/+0
| | | | | | | r371710 and r371711 committed the same line, so this deletes one of them. llvm-svn: 371712
* [WebAssembly] Make wasm-eh.cpp requires WebAssemblyHeejin Ahn2019-09-121-0/+1
| | | | | | | | | D67208 added a new test line to wasm-eh.cpp that invokes the LLVM backend and this test fails on bots that don't have WebAssembly target. This makes wasm-eh.cpp explicitly require WebAssembly so this will be skipped on those targets. llvm-svn: 371711
* [WebAssembly] Add REQUIRES to testDavid Zarzycki2019-09-121-0/+1
| | | | llvm-svn: 371710
* [WebAssembly] Add -fwasm-exceptions for wasm EHHeejin Ahn2019-09-121-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 llvm-svn: 371708
* IR: print value numbers for unnamed function argumentsTim Northover2019-08-031-1/+1
| | | | | | | | | | For consistency with normal instructions and clarity when reading IR, it's best to print the %0, %1, ... names of function arguments in definitions. Also modifies the parser to accept IR in that form for obvious reasons. llvm-svn: 367755
* [WebAssembly] Use rethrow intrinsic in the rethrow blockHeejin Ahn2019-03-161-5/+5
| | | | | | | | | | | | | | | | | | | | | | Summary: Because in wasm we merge all catch clauses into one big catchpad, in case none of the types in catch handlers matches after we test against each of them, we should unwind to the next EH enclosing scope. For this, we should NOT use a call to `__cxa_rethrow` but rather a call to our own rethrow intrinsic, because what we're trying to do here is just to transfer the control flow into the next enclosing EH pad (or the caller). Calls to `__cxa_rethrow` should only be used after a call to `__cxa_begin_catch`. Reviewers: dschuff Subscribers: sbc100, jgravelle-google, sunfish, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59353 llvm-svn: 356317
* [WebAssembly] Hide new Wasm EH behind its feature flagHeejin Ahn2018-06-011-2/+2
| | | | | | | | | | | | | | | | Summary: clang's current wasm EH implementation is a non-MVP feature in progress. We had a `-mexception-handling` wasm feature but were not using it. This patch hides the non-MVP wasm EH behind a flag, so it does not affect other code for now. Reviewers: dschuff Subscribers: sbc100, jgravelle-google, sunfish, cfe-commits Differential Revision: https://reviews.llvm.org/D47614 llvm-svn: 333716
* [WebAssembly] Use Windows EH instructions for Wasm EHHeejin Ahn2018-05-311-0/+384
Summary: Because wasm control flow needs to be structured, using WinEH instructions to support wasm EH brings several benefits. This patch makes wasm EH uses Windows EH instructions, with some changes: 1. Because wasm uses a single catch block to catch all C++ exceptions, this merges all catch clauses into a single catchpad, within which we test the EH selector as in Itanium EH. 2. Generates a call to `__clang_call_terminate` in case a cleanup throws. Wasm does not have a runtime to handle this. 3. In case there is no catch-all clause, inserts a call to `__cxa_rethrow` at the end of a catchpad in order to unwind to an enclosing EH scope. Reviewers: majnemer, dschuff Subscribers: jfb, sbc100, jgravelle-google, sunfish, cfe-commits Differential Revision: https://reviews.llvm.org/D44931 llvm-svn: 333703
OpenPOWER on IntegriCloud