aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenFunction.h
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2015-04-14 20:59:00 +0000
committerReid Kleckner <reid@kleckner.net>2015-04-14 20:59:00 +0000
commitebaf28d13de293ff22dc49a5f40a0540c0aae4bb (patch)
tree21c4e32f36d0b28625933e652d6fc437da2f111f /clang/lib/CodeGen/CodeGenFunction.h
parentbef47e497f6d8851c29c554a9021183f53065ace (diff)
downloadllvm-ebaf28d13de293ff22dc49a5f40a0540c0aae4bb.zip
llvm-ebaf28d13de293ff22dc49a5f40a0540c0aae4bb.tar.gz
llvm-ebaf28d13de293ff22dc49a5f40a0540c0aae4bb.tar.bz2
Reland r234613 (and follow-ups 234614, 234616, 234618)
The frameescape intrinsic cannot be inlined, so I fixed the inliner in r234937. This should address PR23216. llvm-svn: 234942
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.h30
1 files changed, 13 insertions, 17 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h
index 9116b71..7089296 100644
--- a/clang/lib/CodeGen/CodeGenFunction.h
+++ b/clang/lib/CodeGen/CodeGenFunction.h
@@ -263,6 +263,10 @@ public:
/// potentially set the return value.
bool SawAsmBlock;
+ /// True if the current function is an outlined SEH helper. This can be a
+ /// finally block or filter expression.
+ bool IsOutlinedSEHHelper;
+
const CodeGen::CGBlockInfo *BlockInfo;
llvm::Value *BlockPointer;
@@ -351,17 +355,6 @@ public:
void exit(CodeGenFunction &CGF);
};
- /// Cleanups can be emitted for two reasons: normal control leaving a region
- /// exceptional control flow leaving a region.
- struct SEHFinallyInfo {
- SEHFinallyInfo()
- : FinallyBB(nullptr), ContBB(nullptr), ResumeBB(nullptr) {}
-
- llvm::BasicBlock *FinallyBB;
- llvm::BasicBlock *ContBB;
- llvm::BasicBlock *ResumeBB;
- };
-
/// Returns true inside SEH __try blocks.
bool isSEHTryScope() const { return !SEHTryEpilogueStack.empty(); }
@@ -1052,10 +1045,6 @@ public:
llvm::Value *getExceptionSlot();
llvm::Value *getEHSelectorSlot();
- /// Stack slot that contains whether a __finally block is being executed as an
- /// EH cleanup or as a normal cleanup.
- llvm::Value *getAbnormalTerminationSlot();
-
/// Returns the contents of the function's exception object and selector
/// slots.
llvm::Value *getExceptionFromSlot();
@@ -2000,12 +1989,19 @@ public:
void EmitCXXTryStmt(const CXXTryStmt &S);
void EmitSEHTryStmt(const SEHTryStmt &S);
void EmitSEHLeaveStmt(const SEHLeaveStmt &S);
- void EnterSEHTryStmt(const SEHTryStmt &S, SEHFinallyInfo &FI);
- void ExitSEHTryStmt(const SEHTryStmt &S, SEHFinallyInfo &FI);
+ void EnterSEHTryStmt(const SEHTryStmt &S);
+ void ExitSEHTryStmt(const SEHTryStmt &S);
+
+ void startOutlinedSEHHelper(CodeGenFunction &ParentCGF, StringRef Name,
+ QualType RetTy, FunctionArgList &Args,
+ const Stmt *OutlinedStmt);
llvm::Function *GenerateSEHFilterFunction(CodeGenFunction &ParentCGF,
const SEHExceptStmt &Except);
+ llvm::Function *GenerateSEHFinallyFunction(CodeGenFunction &ParentCGF,
+ const SEHFinallyStmt &Finally);
+
void EmitSEHExceptionCodeSave();
llvm::Value *EmitSEHExceptionCode();
llvm::Value *EmitSEHExceptionInfo();