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.)

llvm-svn: 51768
This commit is contained in:
Eli Friedman 2008-05-30 11:28:30 +00:00
parent 617ba48fd5
commit 35c01c6f2d
1 changed files with 1 additions and 0 deletions

View 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) {