[llvm] [WinEH] Take musttail calls into account when unlinking eh records (PR #119702)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 12 10:25:00 PST 2024
================
@@ -363,6 +363,16 @@ void WinEHStatePass::emitExceptionRegistrationRecord(Function *F) {
Instruction *T = BB.getTerminator();
if (!isa<ReturnInst>(T))
continue;
+
+ // Back up to any preceding musttail call, the de-facto terminator.
+ Instruction *Prev = T->getPrevNonDebugInstruction();
----------------
zmodem wrote:
Thanks! I didn't know about that one.
https://github.com/llvm/llvm-project/pull/119702
More information about the llvm-commits
mailing list