summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-05-27 20:06:51 +0000
committerDan Gohman <gohman@apple.com>2010-05-27 20:06:51 +0000
commitd9225cee20fdccc6d49fbdecd70be9254a877333 (patch)
treec3ddbd1c1bd4cb0547852cbe9d5dc7df0c7d1107 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parentc8edcb3651b753054cda0ef9e360daed540f1fe2 (diff)
downloadbcm5719-llvm-d9225cee20fdccc6d49fbdecd70be9254a877333.tar.gz
bcm5719-llvm-d9225cee20fdccc6d49fbdecd70be9254a877333.zip
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. llvm-svn: 104878
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r--llvm/lib/Bitcode/Writer/BitcodeWriter.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
index 9bda6dca3d5..884485dec94 100644
--- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/llvm/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());
OpenPOWER on IntegriCloud