]> granicus.if.org Git - clang/commitdiff
Added an assert.
authorFariborz Jahanian <fjahanian@apple.com>
Tue, 1 Dec 2009 23:35:33 +0000 (23:35 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Tue, 1 Dec 2009 23:35:33 +0000 (23:35 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90285 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGCXX.cpp

index 34d1c8d984a1a7625de917a8ee60ec171f14d8a9..a575dbc463056beafaa1903c4f228a83c10e4f8f 100644 (file)
@@ -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,