Whoops, the old LLVMWriteBitcodeToFileHandle closed the stream.
authorErick Tryzelaar <idadesub@users.sourceforge.net>
Sat, 6 Mar 2010 00:30:01 +0000 (00:30 +0000)
committerErick Tryzelaar <idadesub@users.sourceforge.net>
Sat, 6 Mar 2010 00:30:01 +0000 (00:30 +0000)
Luckily this never was released.

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

lib/Bitcode/Writer/BitWriter.cpp

index d2beaab4686a01d89f47b3d5f1f57990d44f40ef..6119c428895c04b004d6a218a63c1606bc9e9a3b 100644 (file)
@@ -28,7 +28,7 @@ int LLVMWriteBitcodeToFile(LLVMModuleRef M, const char *Path) {
 }
 
 int LLVMWriteBitcodeToFileHandle(LLVMModuleRef M, int FileHandle) {
-  raw_fd_ostream OS(FileHandle, false);
+  raw_fd_ostream OS(FileHandle, true);
   
   WriteBitcodeToFile(unwrap(M), OS);
   return 0;