diff options
author | Heejin Ahn <aheejin@gmail.com> | 2025-02-25 14:12:35 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-25 14:12:35 -0800 |
commit | 40566fd674d110185e2d5e72e320369bfab63ede (patch) | |
tree | 8afdf783ab55040f15f20079f6a08c51c8f5a154 /llvm/lib/CodeGen/MachineInstr.cpp | |
parent | e6f6a1e863895a3378e703525a6d0d293413be33 (diff) | |
download | llvm-40566fd674d110185e2d5e72e320369bfab63ede.zip llvm-40566fd674d110185e2d5e72e320369bfab63ede.tar.gz llvm-40566fd674d110185e2d5e72e320369bfab63ede.tar.bz2 |
[WebAssembly] Generate invokes with llvm.wasm.(re)throw (#128105)
Even though `__builtin_wasm_throw`, which is lowered down to
`llvm.wasm.throw`, throws,
```cpp
try {
__builtin_wasm_throw(0, obj);
} catch (...) {
}
```
does not generate `invoke`. This is because we have assumed the
intrinsic cannot be invoked, which doesn't make much sense. (See #128104
for the historical context)
#128104 made `llvm.wasm.throw` intrinsic invokable in the backend. This
actually generates `invoke`s in Clang for `__builtin_wasm_throw`.
While we're at it, this also generates `invoke`s for
`__builtin_wasm_rethrow`, which is actually not used anywhere in C++
support. I haven't deleted it just in case in may have uses later. (For
example, to support rethrow functionality that carries stack trace with
exnref)
Depends on #128104 for the CI to pass.
Fixes #124710.
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
0 files changed, 0 insertions, 0 deletions