aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2009-12-01 23:35:33 +0000
committerFariborz Jahanian <fjahanian@apple.com>2009-12-01 23:35:33 +0000
commitaffe67eae3790c08aba524617d0a68ad618034ac (patch)
tree0b80261f8c288530fc9667b3441cb4dcb850db07
parent6bc9768408d4b45e00350018b6e3540bc05d267d (diff)
Added an assert.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90285 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/CGCXX.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/CodeGen/CGCXX.cpp b/lib/CodeGen/CGCXX.cpp
index 34d1c8d984..a575dbc463 100644
--- a/lib/CodeGen/CGCXX.cpp
+++ b/lib/CodeGen/CGCXX.cpp
@@ -1808,9 +1808,12 @@ void CodeGenFunction::EmitDtorEpilogue(const CXXDestructorDecl *DD,
}
// If we have a deleting destructor, emit a call to the delete operator.
- if (DtorType == Dtor_Deleting)
+ if (DtorType == Dtor_Deleting) {
+ assert(DD->getOperatorDelete() &&
+ "operator delete missing - EmitDtorEpilogue");
EmitDeleteCall(DD->getOperatorDelete(), LoadCXXThis(),
getContext().getTagDeclType(ClassDecl));
+ }
}
void CodeGenFunction::SynthesizeDefaultDestructor(const CXXDestructorDecl *Dtor,