================
@@ -207,36 +215,59 @@ void CGObjCRuntime::EmitTryCatchStmt(CodeGenFunction &CGF,
         // Push a cleanup for __finally blocks.
         CGF.pushSEHCleanup(NormalAndEHCleanup, FinallyFunc);
     }
+  }
 
 
   // Emit the try body.
   CGF.EmitStmt(S.getTryBody());
 
   // Leave the try.
+  llvm::BasicBlock* dispatchBlock{};
   if (S.getNumCatchStmts())
-    CGF.popCatchScope();
+    dispatchBlock = CGF.popCatchScope();
 
   // Remember where we were.
   CGBuilderTy::InsertPoint SavedIP = CGF.Builder.saveAndClearIP();
 
+  // Wasm uses Windows-style EH instructions, but merges all catch clauses into
----------------
HendrikHuebner wrote:

TODO: This is taken from `CGException.cpp`, we may want to refactor it into a 
shared helper.

https://github.com/llvm/llvm-project/pull/171038
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to