diff options
author | Reid Kleckner <reid@kleckner.net> | 2015-04-10 17:34:52 +0000 |
---|---|---|
committer | Reid Kleckner <reid@kleckner.net> | 2015-04-10 17:34:52 +0000 |
commit | 11859afd5fe485e95d73eaffebb26024d372ac3c (patch) | |
tree | 80dc8f33a7391afe55e0d8d4d1daaa71cee9e26a /clang/lib/CodeGen/CodeGenFunction.h | |
parent | 0aa128e219131558a4dbbcfa02315486069b3b91 (diff) | |
download | llvm-11859afd5fe485e95d73eaffebb26024d372ac3c.zip llvm-11859afd5fe485e95d73eaffebb26024d372ac3c.tar.gz llvm-11859afd5fe485e95d73eaffebb26024d372ac3c.tar.bz2 |
[SEH] Re-land r234532, but use internal linkage for all SEH helpers
Even though these symbols are in a comdat group, the Microsoft linker
really wants them to have internal linkage.
I'm planning to tweak the mangling in a follow-up change. This is a
straight revert with a 1-line fix.
llvm-svn: 234613
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.h | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h index 7cf1521..474bf57 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(); @@ -2003,12 +1992,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(); |