diff options
-rw-r--r-- | clang/Driver/PrintPreprocessedOutput.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/Driver/PrintPreprocessedOutput.cpp b/clang/Driver/PrintPreprocessedOutput.cpp index 28309860ca3..2a363f8ee13 100644 --- a/clang/Driver/PrintPreprocessedOutput.cpp +++ b/clang/Driver/PrintPreprocessedOutput.cpp @@ -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()) |