]> granicus.if.org Git - clang/commitdiff
don't delete a variable on the stack
authorChris Lattner <sabre@nondot.org>
Sun, 17 Aug 2008 07:07:01 +0000 (07:07 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 17 Aug 2008 07:07:01 +0000 (07:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54871 91177308-0d34-0410-b5e6-96231b3b80d8

Driver/PrintPreprocessedOutput.cpp

index 28309860ca3cf118c28680ad757bd4f6c979878f..2a363f8ee13859e09a2ab97336f7a0fa861e1e1e 100644 (file)
@@ -565,8 +565,8 @@ void clang::DoPrintPreprocessedInput(Preprocessor &PP,
   }
   OS << '\n';
   
-  // Flush and free the ostream.
-  delete &OS;
+  // Flush the ostream.
+  OS.flush();
   
   // If an error occurred, remove the output file.
   if (PP.getDiagnostics().hasErrorOccurred() && !OutFile.empty())