aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Bitcode/Writer
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Bitcode/Writer')
-rw-r--r--lib/Bitcode/Writer/BitWriter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Bitcode/Writer/BitWriter.cpp b/lib/Bitcode/Writer/BitWriter.cpp
index d7b1510..727ea3f 100644
--- a/lib/Bitcode/Writer/BitWriter.cpp
+++ b/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);