summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenFunction.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.h22
1 files changed, 20 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h
index 60e81db3753..f6e2bae3195 100644
--- a/clang/lib/CodeGen/CodeGenFunction.h
+++ b/clang/lib/CodeGen/CodeGenFunction.h
@@ -306,6 +306,8 @@ public:
/// write the current selector value into this alloca.
llvm::AllocaInst *EHSelectorSlot;
+ llvm::AllocaInst *AbnormalTerminationSlot;
+
/// The implicit parameter to SEH filter functions of type
/// 'EXCEPTION_POINTERS*'.
ImplicitParamDecl *SEHPointersDecl;
@@ -348,6 +350,17 @@ 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;
+ };
+
/// pushFullExprCleanup - Push a cleanup to be run at the end of the
/// current full-expression. Safe against the possibility that
/// we're currently inside a conditionally-evaluated expression.
@@ -1085,6 +1098,10 @@ 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();
@@ -2007,8 +2024,8 @@ public:
void EmitCXXTryStmt(const CXXTryStmt &S);
void EmitSEHTryStmt(const SEHTryStmt &S);
void EmitSEHLeaveStmt(const SEHLeaveStmt &S);
- void EnterSEHTryStmt(const SEHTryStmt &S);
- void ExitSEHTryStmt(const SEHTryStmt &S);
+ void EnterSEHTryStmt(const SEHTryStmt &S, SEHFinallyInfo &FI);
+ void ExitSEHTryStmt(const SEHTryStmt &S, SEHFinallyInfo &FI);
llvm::Function *GenerateSEHFilterFunction(CodeGenFunction &ParentCGF,
const SEHExceptStmt &Except);
@@ -2016,6 +2033,7 @@ public:
void EmitSEHExceptionCodeSave();
llvm::Value *EmitSEHExceptionCode();
llvm::Value *EmitSEHExceptionInfo();
+ llvm::Value *EmitSEHAbnormalTermination();
void EmitCXXForRangeStmt(const CXXForRangeStmt &S,
ArrayRef<const Attr *> Attrs = None);
OpenPOWER on IntegriCloud