From: Ted Kremenek Date: Mon, 25 Apr 2011 22:57:55 +0000 (+0000) Subject: Re-enable disable free optimization where the FrontendAction is not freed when -disab... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=72e3a0a2a54cdc9cf1c5324c348f1c10f205b2c0;p=clang 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 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 Act(CreateFrontendAction(*Clang)); - if (Act) + if (Act) { Success = Clang->ExecuteAction(*Act); + if (Clang->getFrontendOpts().DisableFree) + Act.take(); + } } return Success;