From 2659aeb5e51fe27d24bbffad0d1851b39fed5e43 Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Wed, 3 Jun 2009 21:11:25 +0000 Subject: Import Clang, at r72805. --- lib/CodeGen/CodeGenFunction.h | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'lib/CodeGen/CodeGenFunction.h') diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h index b7894a4068aab..c91a052cd5499 100644 --- a/lib/CodeGen/CodeGenFunction.h +++ b/lib/CodeGen/CodeGenFunction.h @@ -239,7 +239,30 @@ private: /// 'this' declaration. ImplicitParamDecl *CXXThisDecl; - llvm::SmallVector LiveTemporaries; + /// CXXLiveTemporaryInfo - Holds information about a live C++ temporary. + struct CXXLiveTemporaryInfo { + /// Temporary - The live temporary. + const CXXTemporary *Temporary; + + /// ThisPtr - The pointer to the temporary. + llvm::Value *ThisPtr; + + /// DtorBlock - The destructor block. + llvm::BasicBlock *DtorBlock; + + /// CondPtr - If this is a conditional temporary, this is the pointer to + /// the condition variable that states whether the destructor should be + /// called or not. + llvm::Value *CondPtr; + + CXXLiveTemporaryInfo(const CXXTemporary *temporary, + llvm::Value *thisptr, llvm::BasicBlock *dtorblock, + llvm::Value *condptr) + : Temporary(temporary), ThisPtr(thisptr), DtorBlock(dtorblock), + CondPtr(condptr) { } + }; + + llvm::SmallVector LiveTemporaries; public: CodeGenFunction(CodeGenModule &cgm); @@ -483,6 +506,7 @@ public: llvm::Value *This); void PushCXXTemporary(const CXXTemporary *Temporary, llvm::Value *Ptr); + void PopCXXTemporary(); llvm::Value *EmitCXXNewExpr(const CXXNewExpr *E); -- cgit v1.3