[PATCH] [SEH] Implement filter capturing in CodeGen

Reid Kleckner rnk at google.com
Mon Apr 6 10:19:40 PDT 2015


================
Comment at: lib/CodeGen/CGException.cpp:1363-1364
@@ +1362,4 @@
+    ConstStmtVisitor<CaptureFinder>::Visit(S);
+    for (Stmt::const_child_range CI = S->children(); CI; ++CI)
+      Visit(*CI);
+  }
----------------
majnemer wrote:
> Range-based for?
Hm, yeah, copy-pasta.

================
Comment at: lib/CodeGen/CGException.cpp:1409-1412
@@ +1408,6 @@
+    }
+    if (VD->getType()->isVariablyModifiedType()) {
+      CGM.ErrorUnsupported(VD, "VLA captured by SEH");
+      continue;
+    }
+
----------------
majnemer wrote:
> Why is this forbidden? Can't we just capture the address of the VLA?
Filter outlining uses frameescape / framerecover to get access to the locals of the parent funciton. llvm.frameescape only supports static allocas. We would have to create a static alloca which contains the address of the VLA and then escape that, which is a pretty invasive change. It seemed better to punt on that for now and keep the patch smaller.

http://reviews.llvm.org/D8825

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






More information about the cfe-commits mailing list