diff options
author | Nico Weber <nicolasweber@gmx.de> | 2015-04-10 04:33:03 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2015-04-10 04:33:03 +0000 |
commit | bd51a6a99fc3d54992750f2a82e7e293bfd05851 (patch) | |
tree | ca7834bd75459c6d1680092e812b8e1cce426244 /clang/lib/CodeGen/CodeGenFunction.h | |
parent | e17800c5ab21f95a7f3db1f58ec42a8c7338a137 (diff) | |
download | llvm-bd51a6a99fc3d54992750f2a82e7e293bfd05851.zip llvm-bd51a6a99fc3d54992750f2a82e7e293bfd05851.tar.gz llvm-bd51a6a99fc3d54992750f2a82e7e293bfd05851.tar.bz2 |
Revert r234532 for a bit, it very likely caused http://crbug.com/475768
llvm-svn: 234563
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.h | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h index f4767113..6183b49 100644 --- a/clang/lib/CodeGen/CodeGenFunction.h +++ b/clang/lib/CodeGen/CodeGenFunction.h @@ -263,10 +263,6 @@ 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; @@ -355,6 +351,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; + }; + /// Returns true inside SEH __try blocks. bool isSEHTryScope() const { return !SEHTryEpilogueStack.empty(); } @@ -1045,6 +1052,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(); @@ -1989,19 +2000,12 @@ 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 startOutlinedSEHHelper(CodeGenFunction &ParentCGF, StringRef Name, - QualType RetTy, FunctionArgList &Args, - const Stmt *OutlinedStmt); + void EnterSEHTryStmt(const SEHTryStmt &S, SEHFinallyInfo &FI); + void ExitSEHTryStmt(const SEHTryStmt &S, SEHFinallyInfo &FI); llvm::Function *GenerateSEHFilterFunction(CodeGenFunction &ParentCGF, const SEHExceptStmt &Except); - llvm::Function *GenerateSEHFinallyFunction(CodeGenFunction &ParentCGF, - const SEHFinallyStmt &Finally); - void EmitSEHExceptionCodeSave(); llvm::Value *EmitSEHExceptionCode(); llvm::Value *EmitSEHExceptionInfo(); |