Stub out and start using a Decl::Destroy() method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49532 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp
index 2ef31e4..43da07c 100644
--- a/lib/AST/Decl.cpp
+++ b/lib/AST/Decl.cpp
@@ -329,6 +329,10 @@
   return (*DeclAttrs)[this];
 }
 
+void Decl::Destroy(ASTContext& C) const {
+  C.getAllocator().Deallocate((void *)this);
+}
+
 //===----------------------------------------------------------------------===//
 // DeclContext Implementation
 //===----------------------------------------------------------------------===//
diff --git a/lib/AST/TranslationUnit.cpp b/lib/AST/TranslationUnit.cpp
index b3a2e68..0198f6f 100644
--- a/lib/AST/TranslationUnit.cpp
+++ b/lib/AST/TranslationUnit.cpp
@@ -32,7 +32,7 @@
 
 TranslationUnit::~TranslationUnit() {
   for (iterator I=begin(), E=end(); I!=E; ++I) 
-    delete *I;
+    (*I)->Destroy(*Context);
 }
 
 bool clang::EmitASTBitcodeFile(const TranslationUnit& TU,