[cfe-commits] r62175 - /cfe/trunk/lib/AST/DeclBase.cpp

Douglas Gregor dgregor at apple.com
Tue Jan 13 11:47:14 PST 2009


Author: dgregor
Date: Tue Jan 13 13:47:12 2009
New Revision: 62175

URL: http://llvm.org/viewvc/llvm-project?rev=62175&view=rev
Log:
Turn off some Destroy calls that are currenly causing double-destruction of ScopedDecls. We will re-enable this later, when we have time to fully solve the ownership issue.

Modified:
    cfe/trunk/lib/AST/DeclBase.cpp

Modified: cfe/trunk/lib/AST/DeclBase.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclBase.cpp?rev=62175&r1=62174&r2=62175&view=diff

==============================================================================
--- cfe/trunk/lib/AST/DeclBase.cpp (original)
+++ cfe/trunk/lib/AST/DeclBase.cpp Tue Jan 13 13:47:12 2009
@@ -332,6 +332,9 @@
 
 
 void Decl::Destroy(ASTContext& C) {
+#if 0
+  // FIXME: This causes double-destroys in some cases, so it is
+  // disabled at the moment.
   if (ScopedDecl* SD = dyn_cast<ScopedDecl>(this)) {    
 
     // Observe the unrolled recursion.  By setting N->NextDeclarator = 0x0
@@ -347,7 +350,8 @@
       N = Tmp;
     }
   }  
-  
+#endif
+
   this->~Decl();
   C.getAllocator().Deallocate((void *)this);
 }





More information about the cfe-commits mailing list