From 4f76f4ae311e6af4b34017567cbb5e57b3d1a5d5 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Mon, 25 Apr 2011 22:57:55 +0000 Subject: Re-enable disable free optimization where the FrontendAction is not freed when -disable-free is passed. This accidentally was commited in r128011. llvm-svn: 130168 --- clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'clang/lib/FrontendTool') diff --git a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp b/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp index 0f02f7ac618..664b53351dc 100644 --- a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp +++ b/clang/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; -- cgit v1.2.3