[llvm] [WebAssembly] Fix rethrow's index calculation (PR #114693)

Derek Schuff via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 4 17:04:08 PST 2024


================
@@ -251,15 +251,40 @@ bool WebAssemblyLateEHPrepare::replaceFuncletReturns(MachineFunction &MF) {
       Changed = true;
       break;
     }
+    case WebAssembly::RETHROW:
+      // These RETHROWs here were lowered from llvm.wasm.rethrow() intrinsics,
+      // generated in Clang for when an exception is not caught by the given
+      // type (e.g. catch (int)).
+      //
+      // RETHROW's BB argument is the EH pad the exception to rethrow has been
----------------
dschuff wrote:

```suggestion
      // RETHROW's BB argument is the EH pad where the exception to rethrow has been
```

https://github.com/llvm/llvm-project/pull/114693


More information about the llvm-commits mailing list