Don't flush the raw_ostream in llvm::WriteBitcodeToFile; it's at
authorDan Gohman <gohman@apple.com>
Thu, 27 May 2010 20:26:51 +0000 (20:26 +0000)
committerDan Gohman <gohman@apple.com>
Thu, 27 May 2010 20:26:51 +0000 (20:26 +0000)
the wrong level. Clients which need to leave the stream open but
which still require the bitcode bits to be on disk should call
flush themselves.

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

lib/Bitcode/Writer/BitcodeWriter.cpp

index 884485dec9454c7c4b2ec9e5e8e76ca1ec0630f6..d91696f0e0a5ee0c40d17f55cdd7f378c18e4632 100644 (file)
@@ -1664,9 +1664,6 @@ void llvm::WriteBitcodeToFile(const Module *M, raw_ostream &Out) {
 
   // Write the generated bitstream to "Out".
   Out.write((char*)&Buffer.front(), Buffer.size());
-
-  // Make sure it hits disk now.
-  Out.flush();
 }
 
 /// WriteBitcodeToStream - Write the specified module to the specified output