aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/DeclBase.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-01-13 19:47:12 +0000
committerDouglas Gregor <dgregor@apple.com>2009-01-13 19:47:12 +0000
commita0fc55f3e9d7d7aa8761d0a9726033947d0d6bc0 (patch)
tree6141d07529956e4c2ee3ff464c144f5ffec0d372 /lib/AST/DeclBase.cpp
parent11672ec82f406fabfb349efea0c8c0cc2de6b1d9 (diff)
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62175 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclBase.cpp')
-rw-r--r--lib/AST/DeclBase.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/AST/DeclBase.cpp b/lib/AST/DeclBase.cpp
index 8eb52b722d..7363bd0247 100644
--- a/lib/AST/DeclBase.cpp
+++ b/lib/AST/DeclBase.cpp
@@ -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);
}