From: Erick Tryzelaar Date: Sat, 6 Mar 2010 00:30:01 +0000 (+0000) Subject: Whoops, the old LLVMWriteBitcodeToFileHandle closed the stream. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b3195fbc2e19755c581eaa3aa52bfc1640c8495a;p=oota-llvm.git Whoops, the old LLVMWriteBitcodeToFileHandle closed the stream. Luckily this never was released. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97857 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Bitcode/Writer/BitWriter.cpp b/lib/Bitcode/Writer/BitWriter.cpp index d2beaab4686..6119c428895 100644 --- a/lib/Bitcode/Writer/BitWriter.cpp +++ b/lib/Bitcode/Writer/BitWriter.cpp @@ -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;