aboutsummaryrefslogtreecommitdiff
path: root/lib/FrontendTool/ExecuteCompilerInvocation.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2011-04-25 22:57:55 +0000
committerTed Kremenek <kremenek@apple.com>2011-04-25 22:57:55 +0000
commit72e3a0a2a54cdc9cf1c5324c348f1c10f205b2c0 (patch)
tree99fe3e8629326ec462393b1244b5d04585293011 /lib/FrontendTool/ExecuteCompilerInvocation.cpp
parent1e713f50e904b96623425efa7119fcb98243e111 (diff)
Re-enable disable free optimization where the FrontendAction is not freed when -disable-free is passed. This accidentally was commited in r128011.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130168 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/FrontendTool/ExecuteCompilerInvocation.cpp')
-rw-r--r--lib/FrontendTool/ExecuteCompilerInvocation.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/FrontendTool/ExecuteCompilerInvocation.cpp b/lib/FrontendTool/ExecuteCompilerInvocation.cpp
index 0f02f7ac61..664b53351d 100644
--- a/lib/FrontendTool/ExecuteCompilerInvocation.cpp
+++ b/lib/FrontendTool/ExecuteCompilerInvocation.cpp
@@ -149,8 +149,11 @@ 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;