[PATCH] D13450: [WinEH] Implement state numbering for CoreCLR

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 6 11:34:23 PDT 2015


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

lgtm


================
Comment at: include/llvm/CodeGen/WinEHFuncInfo.h:164
@@ -163,1 +163,3 @@
 
+enum class ClrHandlerType { Catch, Finally, Fault, Filter };
+
----------------
I wasn't aware of fault handlers, but they seem like a great idea. At CppCon, Andrei Alexandrescu presented a way to get them in C++ with destructors, lambdas, and macros, but it's pretty not as clean or efficient as just having language support.

================
Comment at: lib/CodeGen/WinEHPrepare.cpp:2915
@@ +2914,3 @@
+      // A cleanup can have multiple exits; don't re-process after the first.
+      if (FuncInfo.EHPadStateMap.find(Pad) != FuncInfo.EHPadStateMap.end()) {
+        // We might redundantly push a cleanup on the worklist through multiple
----------------
Maybe this?
  if (FuncInfo.EHPadStateMap.count(Pad))
    continue;


http://reviews.llvm.org/D13450





More information about the llvm-commits mailing list