Created a destructor so that the top-level decls can be deleted.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49142 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/TranslationUnit.cpp b/lib/AST/TranslationUnit.cpp
index fdc37a8..8211db1 100644
--- a/lib/AST/TranslationUnit.cpp
+++ b/lib/AST/TranslationUnit.cpp
@@ -30,6 +30,11 @@
        ASTContextBlock = 2,
        DeclsBlock = 3 };
 
+TranslationUnit::~TranslationUnit()
+{
+  for (iterator I=begin(), E=end(); I!=E; ++I) 
+    delete *I;
+}
 
 bool clang::EmitASTBitcodeFile(const TranslationUnit& TU, 
                                const llvm::sys::Path& Filename) {