diff options
author | Chris Lattner <sabre@nondot.org> | 2007-05-06 19:19:23 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-05-06 19:19:23 +0000 |
commit | 4eab2e57f90ee129a6eb4d6030989639beffa746 (patch) | |
tree | 157668ee995939d512a6c24de09fd402cbb21929 /lib/Bitcode/Writer/BitcodeWriter.cpp | |
parent | d44ae90fc8974e01ac672af2816516639ff106ef (diff) |
Flush the file after writing bitcode so that clients who don't close their
ofstreams will be ok.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36878 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r-- | lib/Bitcode/Writer/BitcodeWriter.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Bitcode/Writer/BitcodeWriter.cpp b/lib/Bitcode/Writer/BitcodeWriter.cpp index 65da264b2a..34c838343e 100644 --- a/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -1201,4 +1201,7 @@ void llvm::WriteBitcodeToFile(const Module *M, std::ostream &Out) { // Write the generated bitstream to "Out". Out.write((char*)&Buffer.front(), Buffer.size()); + + // Make sure it hits disk now. + Out.flush(); } |