[clang] [llvm] Fix Windows EH IP2State tables (remove +1 bias) (PR #144745)
Eli Friedman via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 8 21:48:19 PDT 2025
================
@@ -2537,26 +2538,6 @@ void X86AsmPrinter::emitInstruction(const MachineInstr *MI) {
case X86::SEH_BeginEpilogue: {
assert(MF->hasWinCFI() && "SEH_ instruction in function without WinCFI?");
- // Windows unwinder will not invoke function's exception handler if IP is
- // either in prologue or in epilogue. This behavior causes a problem when a
- // call immediately precedes an epilogue, because the return address points
- // into the epilogue. To cope with that, we insert a 'nop' if it ends up
- // immediately after a CALL in the final emitted code.
- MachineBasicBlock::const_iterator MBBI(MI);
- // Check if preceded by a call and emit nop if so.
- for (MBBI = PrevCrossBBInst(MBBI);
- MBBI != MachineBasicBlock::const_iterator();
- MBBI = PrevCrossBBInst(MBBI)) {
----------------
efriedma-quic wrote:
I'm seeing a warning "unused function PrevCrossBBInst"
https://github.com/llvm/llvm-project/pull/144745
More information about the llvm-commits
mailing list