Hendrik =?utf-8?q?Hübner?= <[email protected]>,
Hendrik =?utf-8?q?Hübner?= <[email protected]>,
Hendrik =?utf-8?q?Hübner?= <[email protected]>,
Hendrik =?utf-8?q?Hübner?= <[email protected]>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/[email protected]>
================
@@ -148,12 +151,22 @@ void CGObjCRuntime::EmitTryCatchStmt(CodeGenFunction &CGF,
Cont = CGF.getJumpDestInCurrentScope("eh.cont");
bool useFunclets = EHPersonality::get(CGF).usesFuncletPads();
+ bool IsWasm = EHPersonality::get(CGF).isWasmPersonality();
+ bool IsMSVC = EHPersonality::get(CGF).isMSVCPersonality();
CodeGenFunction::FinallyInfo FinallyInfo;
- if (!useFunclets)
- if (const ObjCAtFinallyStmt *Finally = S.getFinallyStmt())
- FinallyInfo.enter(CGF, Finally->getFinallyBody(),
- beginCatchFn, endCatchFn, exceptionRethrowFn);
+ if (const ObjCAtFinallyStmt *Finally = S.getFinallyStmt()) {
+ if (!useFunclets) {
+ // The finally statement is executed as a cleanup for the normal and
+ // exceptional control flow out of a try-catch block. This is all
+ // implemented in FinallyInfo. Here we enter a new EHCatchScope.
+ FinallyInfo.enter(CGF, Finally->getFinallyBody(), beginCatchFn,
+ endCatchFn, exceptionRethrowFn);
+ } else if (IsWasm) {
+ CGF.ErrorUnsupported(Finally,
+ "@finally is not implemented for WebAssembly");
----------------
davidchisnall wrote:
For an initial version, lowering finally to a catchall and a rethrow is close
enough that it is unlikely anyone will notice the difference.
https://github.com/llvm/llvm-project/pull/215562
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits