From 5e14d39a8808d87b4ce4706b5944baa26bb4868c Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Mon, 21 Mar 2011 18:40:17 +0000 Subject: Improve crash recovery cleanup to recovery CompilerInstances during crash recovery. This was a huge resource "root" during crashes. This change requires making a bunch of fundamental Clang structures (optionally) reference counted to allow correct ownership semantics of these objects (e.g., ASTContext) to play out between an active ASTUnit and CompilerInstance object. llvm-svn: 128011 --- clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp') diff --git a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp b/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp index 664b53351dc..0f02f7ac618 100644 --- a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp +++ b/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp @@ -149,11 +149,8 @@ bool clang::ExecuteCompilerInvocation(CompilerInstance *Clang) { if (!Clang->getDiagnostics().hasErrorOccurred()) { // Create and execute the frontend action. llvm::OwningPtr Act(CreateFrontendAction(*Clang)); - if (Act) { + if (Act) Success = Clang->ExecuteAction(*Act); - if (Clang->getFrontendOpts().DisableFree) - Act.take(); - } } return Success; -- cgit v1.2.3