From d928fb670fb3b0818fc23738e9c2418980bb141e Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Thu, 27 May 2010 20:06:51 +0000 Subject: Don't special-case stdout in llvm::WriteBitcodeToFile; just consider it to be the caller's responsibility to provide a stream in binary mode. This fixes a layering violation and avoids an outs() call. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104878 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Bitcode/Writer/BitcodeWriter.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'lib/Bitcode/Writer') diff --git a/lib/Bitcode/Writer/BitcodeWriter.cpp b/lib/Bitcode/Writer/BitcodeWriter.cpp index 9bda6dc..884485d 100644 --- a/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -1662,10 +1662,6 @@ void llvm::WriteBitcodeToFile(const Module *M, raw_ostream &Out) { WriteBitcodeToStream( M, Stream ); - // If writing to stdout, set binary mode. - if (&llvm::outs() == &Out) - sys::Program::ChangeStdoutToBinary(); - // Write the generated bitstream to "Out". Out.write((char*)&Buffer.front(), Buffer.size()); -- cgit v1.1