summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenFunction.h
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-02-19 09:25:03 +0000
committerJohn McCall <rjmccall@apple.com>2010-02-19 09:25:03 +0000
commitb81884d347867e9540d37731615ced107aedc6b4 (patch)
treedd5044e1b61534791c6c7d0a81bde506b3d9494c /clang/lib/CodeGen/CodeGenFunction.h
parent655ca0cd4a6d8a12913ca436083a3faec9114912 (diff)
downloadbcm5719-llvm-b81884d347867e9540d37731615ced107aedc6b4.tar.gz
bcm5719-llvm-b81884d347867e9540d37731615ced107aedc6b4.zip
More refactoring around constructor/destructor code generation.
Fix some bugs with function-try-blocks and simplify normal try-block code generation. This implementation excludes a deleting destructor's call to operator delete() from the function-try-block, which I believe is correct but which I can't find straightforward support for at a moment's glance. llvm-svn: 96670
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.h29
1 files changed, 13 insertions, 16 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h
index 29c75fdb8e0..1c5cd67fa9d 100644
--- a/clang/lib/CodeGen/CodeGenFunction.h
+++ b/clang/lib/CodeGen/CodeGenFunction.h
@@ -91,9 +91,6 @@ public:
/// CurGD - The GlobalDecl for the current function being compiled.
GlobalDecl CurGD;
- /// OuterTryBlock - This is the address of the outter most try block, 0
- /// otherwise.
- const Stmt *OuterTryBlock;
/// ReturnBlock - Unified return block.
llvm::BasicBlock *ReturnBlock;
@@ -494,7 +491,9 @@ public:
const FunctionArgList &Args,
SourceLocation StartLoc);
- void GenerateBody(GlobalDecl GD, llvm::Function *Fn, FunctionArgList &Args);
+ void EmitConstructorBody(FunctionArgList &Args);
+ void EmitDestructorBody(FunctionArgList &Args);
+ void EmitFunctionBody(FunctionArgList &Args);
/// EmitReturnBlock - Emit the unified return block, trying to avoid its
/// emission when possible.
@@ -529,18 +528,8 @@ public:
llvm::Value *ThisPtr,
uint64_t Offset);
- void SynthesizeCXXCopyConstructor(const CXXConstructorDecl *Ctor,
- CXXCtorType Type,
- llvm::Function *Fn,
- const FunctionArgList &Args);
-
- void SynthesizeCXXCopyAssignment(const CXXMethodDecl *CD,
- llvm::Function *Fn,
- const FunctionArgList &Args);
-
- void SynthesizeImplicitFunctionBody(GlobalDecl GD,
- llvm::Function *Fn,
- const FunctionArgList &Args);
+ void SynthesizeCXXCopyConstructor(const FunctionArgList &Args);
+ void SynthesizeCXXCopyAssignment(const FunctionArgList &Args);
/// EmitDtorEpilogue - Emit all code that comes at the end of class's
/// destructor. This is to call destructors on members and base classes in
@@ -927,6 +916,14 @@ public:
void EmitObjCAtThrowStmt(const ObjCAtThrowStmt &S);
void EmitObjCAtSynchronizedStmt(const ObjCAtSynchronizedStmt &S);
+ struct CXXTryStmtInfo {
+ llvm::BasicBlock *SavedLandingPad;
+ llvm::BasicBlock *HandlerBlock;
+ llvm::BasicBlock *FinallyBlock;
+ };
+ CXXTryStmtInfo EnterCXXTryStmt(const CXXTryStmt &S);
+ void ExitCXXTryStmt(const CXXTryStmt &S, CXXTryStmtInfo Info);
+
void EmitCXXTryStmt(const CXXTryStmt &S);
//===--------------------------------------------------------------------===//
OpenPOWER on IntegriCloud