Ensure that destructors are called for NRVO'd objects when the
function does not return. Thanks to Eli for pointing out this corner
case.
llvm-svn: 103941
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h
index 4f85878..e3e7472 100644
--- a/clang/lib/CodeGen/CodeGenFunction.h
+++ b/clang/lib/CodeGen/CodeGenFunction.h
@@ -107,6 +107,11 @@
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.