[all-commits] [llvm/llvm-project] 40566f: [WebAssembly] Generate invokes with llvm.wasm.(re)...
Heejin Ahn via All-commits
all-commits at lists.llvm.org
Tue Feb 25 14:12:57 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 40566fd674d110185e2d5e72e320369bfab63ede
https://github.com/llvm/llvm-project/commit/40566fd674d110185e2d5e72e320369bfab63ede
Author: Heejin Ahn <aheejin at gmail.com>
Date: 2025-02-25 (Tue, 25 Feb 2025)
Changed paths:
M clang/lib/CodeGen/CGBuiltin.cpp
A clang/test/CodeGenCXX/builtins-eh-wasm.cpp
Log Message:
-----------
[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.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list