[PATCH] D67201: [Windows] Replace TrapUnreachable with an int3 insertion pass

Hans Wennborg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 5 05:38:55 PDT 2019


hans accepted this revision.
hans added a comment.
This revision is now accepted and ready to land.

lgtm. I only know about this from what rnk told me about the unwinder not wanting the return address to be outside the function, and this seems like a straight-forward solution to that problem.



================
Comment at: llvm/lib/Target/X86/X86.h:85
+/// Return a pass that inserts int3 at the end of the function if it ends with a
+/// CALL instruction. The pass does the same for each funclet as well.
+FunctionPass *createX86AvoidTrailingCallPass();
----------------
Maybe mention briefly that this is in order not to confuse certain unwinders? Otherwise this describes perfectly the "what" but not the "why".


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67201/new/

https://reviews.llvm.org/D67201





More information about the llvm-commits mailing list