[llvm-commits] CVS: llvm/tools/llvm-ar/llvm-ar.cpp
Jeff Cohen
jeffc at jolt-lang.org
Sat Jan 22 09:36:31 PST 2005
Changes in directory llvm/tools/llvm-ar:
llvm-ar.cpp updated: 1.25 -> 1.26
---
Log message:
Use binary mode for reading/writing bytecode files
---
Diffs of the changes: (+3 -1)
llvm-ar.cpp | 4 +++-
1 files changed, 3 insertions(+), 1 deletion(-)
Index: llvm/tools/llvm-ar/llvm-ar.cpp
diff -u llvm/tools/llvm-ar/llvm-ar.cpp:1.25 llvm/tools/llvm-ar/llvm-ar.cpp:1.26
--- llvm/tools/llvm-ar/llvm-ar.cpp:1.25 Wed Dec 15 15:58:03 2004
+++ llvm/tools/llvm-ar/llvm-ar.cpp Sat Jan 22 11:36:17 2005
@@ -436,7 +436,9 @@
}
// Open up a file stream for writing
- std::ofstream file(I->getPath().c_str());
+ std::ios::openmode io_mode = std::ios::out | std::ios::trunc |
+ std::ios::binary;
+ std::ofstream file(I->getPath().c_str(), io_mode);
// Get the data and its length
const char* data = reinterpret_cast<const char*>(I->getData());
More information about the llvm-commits
mailing list