Don't call flush() at a library level which isn't checking for errors
authorDan Gohman <gohman@apple.com>
Tue, 1 Jun 2010 16:31:34 +0000 (16:31 +0000)
committerDan Gohman <gohman@apple.com>
Tue, 1 Jun 2010 16:31:34 +0000 (16:31 +0000)
and doesn't know where the output is going.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105274 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/MC/MCStreamer.h
lib/MC/MCAsmStreamer.cpp
lib/MC/MCAssembler.cpp

index 6b163e22b3902c01296cb51e77ae6ccc6d7bf857..8c92fc77881c7a1388c18167a74fcd61bab330e0 100644 (file)
@@ -314,7 +314,7 @@ namespace llvm {
     virtual void EmitRawText(StringRef String);
     void EmitRawText(const Twine &String);
     
-    /// Finish - Finish emission of machine code and flush any output.
+    /// Finish - Finish emission of machine code.
     virtual void Finish() = 0;
   };
 
index 57b2bcceb1a1195b36d36002c7162f806ba8f84d..de1d6ee35e0cb5f14460ddddc4d4fa636f7512ea 100644 (file)
@@ -693,7 +693,6 @@ void MCAsmStreamer::EmitRawText(StringRef String) {
 }
 
 void MCAsmStreamer::Finish() {
-  OS.flush();
 }
 
 MCStreamer *llvm::createAsmStreamer(MCContext &Context,
index 59366565a6d1a849f8822010a2d72f81ab55a798..c971ee207f9be1512143ef275039624c22df3b80 100644 (file)
@@ -759,7 +759,6 @@ void MCAssembler::Finish() {
 
   // Write the object file.
   Writer->WriteObject(*this, Layout);
-  OS.flush();
 
   stats::ObjectBytes += OS.tell() - StartOffset;
 }