[PATCH] Use WinEHPrepare to outline SEH finally blocks

Reid Kleckner rnk at google.com
Thu Mar 19 14:51:22 PDT 2015


REPOSITORY
  rL LLVM

================
Comment at: llvm/trunk/lib/CodeGen/WinEHPrepare.cpp:1194
@@ +1193,3 @@
+      // Once we reach a catch-all, don't expect to hit a resume instruction.
+      BB = nullptr;
+      break;
----------------
andrew.w.kaylor wrote:
> This is wrong for the C++ EH case, which can have cleanup code to be executed after a catch-all handler.  Setting BB to NULL will prevent use from finding the cleanup in that scenario.
Can you elaborate? Is this a cleanup inside the catch, or outside the catch? I don't think it's possible to have exceptional cleanups after a catchall:
  void f() {
    HasDtor o;
    try { g(); }
    catch (...) { g(); }
  }

http://reviews.llvm.org/D8370

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list