]> granicus.if.org Git - clang/commitdiff
Re-enable disable free optimization where the FrontendAction is not freed when -disab...
authorTed Kremenek <kremenek@apple.com>
Mon, 25 Apr 2011 22:57:55 +0000 (22:57 +0000)
committerTed Kremenek <kremenek@apple.com>
Mon, 25 Apr 2011 22:57:55 +0000 (22:57 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130168 91177308-0d34-0410-b5e6-96231b3b80d8

lib/FrontendTool/ExecuteCompilerInvocation.cpp

index 0f02f7ac6186b45deedaea35f79d4d163fdccaf0..664b53351dc123c548369ad013125022b5f77ee5 100644 (file)
@@ -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;