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
diff --git a/lib/FrontendTool/ExecuteCompilerInvocation.cpp b/lib/FrontendTool/ExecuteCompilerInvocation.cpp
index 0f02f7a..664b533 100644
--- a/lib/FrontendTool/ExecuteCompilerInvocation.cpp
+++ b/lib/FrontendTool/ExecuteCompilerInvocation.cpp
@@ -149,8 +149,11 @@
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;