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
This commit is contained in:
Ted Kremenek
2011-03-21 18:40:17 +00:00
parent 0aaa67b1c2
commit 5e14d39a88
13 changed files with 141 additions and 163 deletions

View File

@@ -149,11 +149,8 @@ bool clang::ExecuteCompilerInvocation(CompilerInstance *Clang) {
if (!Clang->getDiagnostics().hasErrorOccurred()) {
// Create and execute the frontend action.
llvm::OwningPtr<FrontendAction> Act(CreateFrontendAction(*Clang));
if (Act) {
if (Act)
Success = Clang->ExecuteAction(*Act);
if (Clang->getFrontendOpts().DisableFree)
Act.take();
}
}
return Success;