]> granicus.if.org Git - clang/commitdiff
Fix crash with -serialize (reported to cfe-dev). The issue was
authorEli Friedman <eli.friedman@gmail.com>
Fri, 30 May 2008 11:28:30 +0000 (11:28 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Fri, 30 May 2008 11:28:30 +0000 (11:28 +0000)
essentially that we were destroying the declarations twice.

(Note that we don't use -serialize directly in the testsuite, only
SerializeTest.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51768 91177308-0d34-0410-b5e6-96231b3b80d8

Driver/ASTConsumers.cpp

index 3383dd38fdcf6152b0657e7c8e418f50c7db5056..ba9fc90f034864a9e6a8866b648232b024ea5934 100644 (file)
@@ -879,6 +879,7 @@ public:
   
   virtual void Initialize(ASTContext &Context) {
     if (!TU) TU = new TranslationUnit(Context, lang);
+    TU->SetOwnsDecls(false);
   }
   
   virtual void HandleTopLevelDecl(Decl *D) {