diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-05-17 15:52:46 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-05-17 15:52:46 +0000 |
commit | 3d91bbcdab155181556969cad6ec97014405aced (patch) | |
tree | 0ad09340028c6dc86c10cc9fdc7aa014b07502ad /lib/CodeGen/CodeGenFunction.h | |
parent | 79a9ad8e5eec3696989354be13a74a1106f64f72 (diff) |
Ensure that destructors are called for NRVO'd objects when the
function does not return. Thanks to Eli for pointing out this corner
case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103941 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.h')
-rw-r--r-- | lib/CodeGen/CodeGenFunction.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h index 4f85878f0c..e3e7472317 100644 --- a/lib/CodeGen/CodeGenFunction.h +++ b/lib/CodeGen/CodeGenFunction.h @@ -107,6 +107,11 @@ public: bool Exceptions; bool CatchUndefined; + + /// \brief A mapping from NRVO variables to the flags used to indicate + /// when the NRVO has been applied to this variable. + llvm::DenseMap<const VarDecl *, llvm::Value *> NRVOFlags; + public: /// ObjCEHValueStack - Stack of Objective-C exception values, used for /// rethrows. |