aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenFunction.h
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-06-03 18:54:26 +0000
committerAnders Carlsson <andersca@mac.com>2009-06-03 18:54:26 +0000
commite8b5578fcc2a3ffb90986f95f2c9127a9a08e34b (patch)
tree3500ce12e0b91a47bc2df4d26691970e211688b3 /lib/CodeGen/CodeGenFunction.h
parent2ce66125025536e6a06dc5cbc809d621a7c71a74 (diff)
Store more information about live temporaries. No functionality change for now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72793 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.h')
-rw-r--r--lib/CodeGen/CodeGenFunction.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h
index b7894a4068..97ca81bc2b 100644
--- a/lib/CodeGen/CodeGenFunction.h
+++ b/lib/CodeGen/CodeGenFunction.h
@@ -239,7 +239,30 @@ private:
/// 'this' declaration.
ImplicitParamDecl *CXXThisDecl;
- llvm::SmallVector<const CXXTemporary*, 4> 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::Value *condptr,
+ llvm::BasicBlock *dtorblock)
+ : Temporary(temporary), ThisPtr(thisptr), DtorBlock(dtorblock),
+ CondPtr(condptr) { }
+ };
+
+ llvm::SmallVector<CXXLiveTemporaryInfo, 4> LiveTemporaries;
public:
CodeGenFunction(CodeGenModule &cgm);