[cfe-commits] r130168 - /cfe/trunk/lib/FrontendTool/ExecuteCompilerInvocation.cpp

Ted Kremenek kremenek at apple.com
Mon Apr 25 15:57:55 PDT 2011


Author: kremenek
Date: Mon Apr 25 17:57:55 2011
New Revision: 130168

URL: http://llvm.org/viewvc/llvm-project?rev=130168&view=rev
Log:
Re-enable disable free optimization where the FrontendAction is not freed when -disable-free is passed.  This accidentally was commited in r128011.

Modified:
    cfe/trunk/lib/FrontendTool/ExecuteCompilerInvocation.cpp

Modified: cfe/trunk/lib/FrontendTool/ExecuteCompilerInvocation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/FrontendTool/ExecuteCompilerInvocation.cpp?rev=130168&r1=130167&r2=130168&view=diff
==============================================================================
--- cfe/trunk/lib/FrontendTool/ExecuteCompilerInvocation.cpp (original)
+++ cfe/trunk/lib/FrontendTool/ExecuteCompilerInvocation.cpp Mon Apr 25 17:57:55 2011
@@ -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;





More information about the cfe-commits mailing list