[PATCH] Add a Windows EH preparation pass that zaps resumes

Reid Kleckner rnk at google.com
Tue Jan 27 17:52:45 PST 2015


Hi majnemer,

If the personality is not a recognized MSVC personality function, this
pass delegates to the dwarf EH preparation pass. This chaining supports
people on *-windows-itanium or *-windows-gnu targets.

Currently this recognizes some personalities used by MSVC and turns
resume instructions into traps to avoid link errors.  Even if cleanups
are not used in the source program, LLVM requires the frontend to emit a
code path that resumes unwinding after an exception.  Clang does this,
and we get unreachable resume instructions. PR20300 covers cleaning up
these unreachable calls to resume.

http://reviews.llvm.org/D7216

Files:
  include/llvm/CodeGen/Passes.h
  lib/CodeGen/CMakeLists.txt
  lib/CodeGen/Passes.cpp
  lib/CodeGen/WinEHPrepare.cpp
  test/CodeGen/X86/seh-safe-div.ll

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7216.18870.patch
Type: text/x-patch
Size: 5611 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150128/a9f65df8/attachment.bin>


More information about the llvm-commits mailing list