diff options
author | Gordon Henriksen <gordonhenriksen@mac.com> | 2007-12-03 14:50:37 +0000 |
---|---|---|
committer | Gordon Henriksen <gordonhenriksen@mac.com> | 2007-12-03 14:50:37 +0000 |
commit | 4814cd227195d7b02b25070a73d0e91d0e42ba95 (patch) | |
tree | 5f76a610087d517517bd59c7c3ac17a9719a46cf /llvm/lib/Bitcode/Writer/BitWriter.cpp | |
parent | bf96d99383853e4bd2a6802ad59163f14f5b4380 (diff) | |
download | bcm5719-llvm-4814cd227195d7b02b25070a73d0e91d0e42ba95.tar.gz bcm5719-llvm-4814cd227195d7b02b25070a73d0e91d0e42ba95.zip |
Applying Anton's binmode fix to the other ofstream too.
llvm-svn: 44535
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitWriter.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Writer/BitWriter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitWriter.cpp b/llvm/lib/Bitcode/Writer/BitWriter.cpp index d7b15104662..727ea3ff636 100644 --- a/llvm/lib/Bitcode/Writer/BitWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitWriter.cpp @@ -17,7 +17,7 @@ using namespace llvm; /*===-- Operations on modules ---------------------------------------------===*/ int LLVMWriteBitcodeToFile(LLVMModuleRef M, const char *Path) { - std::ofstream OS(Path); + std::ofstream OS(Path, std::ios_base::out|std::ios::trunc|std::ios::binary); if (!OS.fail()) WriteBitcodeToFile(unwrap(M), OS); |