[llvm-commits] [llvm] r44535 - /llvm/trunk/lib/Bitcode/Writer/BitWriter.cpp

Gordon Henriksen gordonhenriksen at mac.com
Mon Dec 3 06:50:37 PST 2007


Author: gordon
Date: Mon Dec  3 08:50:37 2007
New Revision: 44535

URL: http://llvm.org/viewvc/llvm-project?rev=44535&view=rev
Log:
Applying Anton's binmode fix to the other ofstream too.

Modified:
    llvm/trunk/lib/Bitcode/Writer/BitWriter.cpp

Modified: llvm/trunk/lib/Bitcode/Writer/BitWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Writer/BitWriter.cpp?rev=44535&r1=44534&r2=44535&view=diff

==============================================================================
--- llvm/trunk/lib/Bitcode/Writer/BitWriter.cpp (original)
+++ llvm/trunk/lib/Bitcode/Writer/BitWriter.cpp Mon Dec  3 08:50:37 2007
@@ -17,7 +17,7 @@
 /*===-- 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);





More information about the llvm-commits mailing list