Fix the destruction "properly" in the sense that we actually destroy the 
ASTs.  This is a hack, but I haven't considered how we really 
want to do this.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51364 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Driver/SerializationTest.cpp b/Driver/SerializationTest.cpp
index 6e9309d..5f7b94f 100644
--- a/Driver/SerializationTest.cpp
+++ b/Driver/SerializationTest.cpp
@@ -44,7 +44,10 @@
   ~SerializationTest();
 
   virtual void Initialize(ASTContext& context) {
-    if (!TU) TU.reset(new TranslationUnit(context, lopts));
+    if (!TU) {
+      TU.reset(new TranslationUnit(context, lopts));
+      TU->SetOwnsDecls(false);
+    }
   }  
 
   virtual void HandleTopLevelDecl(Decl *D) {