From 55c6570bf6f4342203eb0ff0816fe28e6c55964a Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Mon, 26 Jul 2010 21:29:50 +0000 Subject: [PATCH] It's not necessary to call flush() on a raw_ostream immediately prior to deleting it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109441 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Frontend/DocumentXML.h | 1 - lib/AST/TypePrinter.cpp | 1 - lib/Frontend/DependencyFile.cpp | 1 - 3 files changed, 3 deletions(-) diff --git a/include/clang/Frontend/DocumentXML.h b/include/clang/Frontend/DocumentXML.h index 73d892105f..602d846558 100644 --- a/include/clang/Frontend/DocumentXML.h +++ b/include/clang/Frontend/DocumentXML.h @@ -150,7 +150,6 @@ inline void DocumentXML::addAttribute(const char* pName, const T& value) { { llvm::raw_string_ostream buf(repr); buf << value; - buf.flush(); } Out << ' ' << pName << "=\"" diff --git a/lib/AST/TypePrinter.cpp b/lib/AST/TypePrinter.cpp index a08ee1ae69..463e9099e4 100644 --- a/lib/AST/TypePrinter.cpp +++ b/lib/AST/TypePrinter.cpp @@ -463,7 +463,6 @@ void TypePrinter::PrintTag(TagDecl *D, std::string &InnerString) { } OS << '>'; - OS.flush(); } // If this is a class template specialization, print the template diff --git a/lib/Frontend/DependencyFile.cpp b/lib/Frontend/DependencyFile.cpp index 14aee3559c..cdff8077ee 100644 --- a/lib/Frontend/DependencyFile.cpp +++ b/lib/Frontend/DependencyFile.cpp @@ -53,7 +53,6 @@ public: virtual void EndOfMainFile() { OutputDependencyFile(); - OS->flush(); delete OS; OS = 0; } -- 2.40.0