[cfe-commits] r51768 - /cfe/trunk/Driver/ASTConsumers.cpp

Eli Friedman eli.friedman at gmail.com
Fri May 30 04:28:31 PDT 2008


Author: efriedma
Date: Fri May 30 06:28:30 2008
New Revision: 51768

URL: http://llvm.org/viewvc/llvm-project?rev=51768&view=rev
Log:
Fix crash with -serialize (reported to cfe-dev). The issue was 
essentially that we were destroying the declarations twice.

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


Modified:
    cfe/trunk/Driver/ASTConsumers.cpp

Modified: cfe/trunk/Driver/ASTConsumers.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/ASTConsumers.cpp?rev=51768&r1=51767&r2=51768&view=diff

==============================================================================
--- cfe/trunk/Driver/ASTConsumers.cpp (original)
+++ cfe/trunk/Driver/ASTConsumers.cpp Fri May 30 06:28:30 2008
@@ -879,6 +879,7 @@
   
   virtual void Initialize(ASTContext &Context) {
     if (!TU) TU = new TranslationUnit(Context, lang);
+    TU->SetOwnsDecls(false);
   }
   
   virtual void HandleTopLevelDecl(Decl *D) {





More information about the cfe-commits mailing list