diff options
author | Ted Kremenek <kremenek@apple.com> | 2011-03-21 18:40:17 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2011-03-21 18:40:17 +0000 |
commit | 5e14d39a8808d87b4ce4706b5944baa26bb4868c (patch) | |
tree | 591b9cb4af04c2d5ec364a3ed8eaded03d0b6eed /clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp | |
parent | 0aaa67b1c2d832e8ab87fd98fcb15c431fb3404c (diff) | |
download | bcm5719-llvm-5e14d39a8808d87b4ce4706b5944baa26bb4868c.tar.gz bcm5719-llvm-5e14d39a8808d87b4ce4706b5944baa26bb4868c.zip |
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
Diffstat (limited to 'clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp')
-rw-r--r-- | clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
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<FrontendAction> Act(CreateFrontendAction(*Clang)); - if (Act) { + if (Act) Success = Clang->ExecuteAction(*Act); - if (Clang->getFrontendOpts().DisableFree) - Act.take(); - } } return Success; |