This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Use rethrow intrinsic in the rethrow block
ClosedPublic

Authored by aheejin on Mar 14 2019, 3:38 AM.

Details

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.

Diff Detail

Repository
rC Clang

Event Timeline

aheejin created this revision.Mar 14 2019, 3:38 AM
dschuff accepted this revision.Mar 14 2019, 2:30 PM
This revision is now accepted and ready to land.Mar 14 2019, 2:30 PM
This revision was automatically updated to reflect the committed changes.