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.

llvm-svn: 62175
This commit is contained in:
Douglas Gregor 2009-01-13 19:47:12 +00:00
parent 45da8b779c
commit 89100920d6
1 changed files with 5 additions and 1 deletions

View File

@ -332,6 +332,9 @@ void Decl::swapAttrs(Decl *RHS) {
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 @@ void Decl::Destroy(ASTContext& C) {
N = Tmp;
}
}
#endif
this->~Decl();
C.getAllocator().Deallocate((void *)this);
}