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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user