[clang] [CodeGen][Objective-C] Add WebAssembly `@finally` support (PR #218967)
Heejin Ahn via cfe-commits
cfe-commits at lists.llvm.org
Sat Sep 19 01:29:50 PDT 2026
Hendrik =?utf-8?q?Hübner?= <hhuebner at MacBookPro.localdomain>,
Hendrik =?utf-8?q?Hübner?= <hhuebner at MacBookPro.localdomain>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/218967 at github.com>
================
@@ -1412,15 +1412,14 @@ namespace {
CGF.Builder.CreateCondBr(ShouldRethrow, RethrowBB, ContBB);
CGF.EmitBlock(RethrowBB);
- if (SavedExnVar) {
+ if (!SavedExnVar) {
+ CGF.EmitNoreturnRuntimeCallOrInvoke(RethrowFn, {});
+ } else {
CGF.EmitRuntimeCallOrInvoke(RethrowFn, CGF.Builder.CreateAlignedLoad(
CGF.Int8PtrTy, SavedExnVar,
CGF.getPointerAlign()));
-
- } else {
- CGF.EmitRuntimeCallOrInvoke(RethrowFn);
+ CGF.Builder.CreateUnreachable();
----------------
aheejin wrote:
Not related to Wasm case, but can't we use `EmitNoreturnRuntimeCallOrInvoke` here too? Also nit, but I think the original order `if (SavedExnVar) ... else ...` is more intuitive.
https://github.com/llvm/llvm-project/pull/218967
More information about the cfe-commits
mailing list