aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenFunction.h
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2015-04-08 22:23:48 +0000
committerReid Kleckner <reid@kleckner.net>2015-04-08 22:23:48 +0000
commit31a1bb0c146aae195308b4b1c8154ba5aced80ce (patch)
tree604d39172a63bb41222886880411ef3053ccb158 /clang/lib/CodeGen/CodeGenFunction.h
parented6b5fc4b0ef3b277d9e2309323dcb3c6c4b4bd6 (diff)
downloadllvm-31a1bb0c146aae195308b4b1c8154ba5aced80ce.zip
llvm-31a1bb0c146aae195308b4b1c8154ba5aced80ce.tar.gz
llvm-31a1bb0c146aae195308b4b1c8154ba5aced80ce.tar.bz2
Reland "[SEH] Implement filter capturing in CodeGen"
The test should be fixed. It was failing in NDEBUG builds due to a missing '*' character in a regex. In asserts builds, the pattern matched a single digit value, which became a double digit value in NDEBUG builds. Go figure. This reverts commit r234261. llvm-svn: 234447
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h
index 8d3408a..6183b49 100644
--- a/clang/lib/CodeGen/CodeGenFunction.h
+++ b/clang/lib/CodeGen/CodeGenFunction.h
@@ -877,6 +877,10 @@ private:
typedef llvm::DenseMap<const Decl*, llvm::Value*> DeclMapTy;
DeclMapTy LocalDeclMap;
+ /// Track escaped local variables with auto storage. Used during SEH
+ /// outlining to produce a call to llvm.frameescape.
+ llvm::DenseMap<llvm::AllocaInst *, int> EscapedLocals;
+
/// LabelMap - This keeps track of the LLVM basic block for each C label.
llvm::DenseMap<const LabelDecl*, JumpDest> LabelMap;
@@ -2007,6 +2011,12 @@ public:
llvm::Value *EmitSEHExceptionInfo();
llvm::Value *EmitSEHAbnormalTermination();
+ /// Scan the outlined statement for captures from the parent function. For
+ /// each capture, mark the capture as escaped and emit a call to
+ /// llvm.framerecover. Insert the framerecover result into the LocalDeclMap.
+ void EmitCapturedLocals(CodeGenFunction &ParentCGF, const Stmt *OutlinedStmt,
+ llvm::Value *ParentFP);
+
void EmitCXXForRangeStmt(const CXXForRangeStmt &S,
ArrayRef<const Attr *> Attrs = None);