[llvm] [SjLjEHPrepare] Configure call sites correctly (PR #117656)
Sergei Barannikov via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 25 17:11:51 PST 2024
================
@@ -435,6 +435,10 @@ bool SjLjEHPrepareImpl::setupEntryBlockAndCallSites(Function &F) {
// where to look for it.
Builder.CreateCall(FuncCtxFn, FuncCtx);
+ // Register the function context and make sure it's known to not throw.
+ CallInst *Register = Builder.CreateCall(RegisterFn, FuncCtx, "");
+ Register->setDoesNotThrow();
+
----------------
s-barannikov wrote:
This NFC change wasn't strictly necessary, but with it the generated code becomes more logical/structured (setting up call sites right before associated calls).
https://github.com/llvm/llvm-project/pull/117656
More information about the llvm-commits
mailing list