[llvm-commits] CVS: llvm/tools/gccld/gccld.cpp
Jeff Cohen
jeffc at jolt-lang.org
Sat Jan 22 09:36:30 PST 2005
Changes in directory llvm/tools/gccld:
gccld.cpp updated: 1.94 -> 1.95
---
Log message:
Use binary mode for reading/writing bytecode files
---
Diffs of the changes: (+3 -1)
gccld.cpp | 4 +++-
1 files changed, 3 insertions(+), 1 deletion(-)
Index: llvm/tools/gccld/gccld.cpp
diff -u llvm/tools/gccld/gccld.cpp:1.94 llvm/tools/gccld/gccld.cpp:1.95
--- llvm/tools/gccld/gccld.cpp:1.94 Mon Dec 20 21:24:02 2004
+++ llvm/tools/gccld/gccld.cpp Sat Jan 22 11:36:16 2005
@@ -238,7 +238,9 @@
// Create the output file.
std::string RealBytecodeOutput = OutputFilename;
if (!LinkAsLibrary) RealBytecodeOutput += ".bc";
- std::ofstream Out(RealBytecodeOutput.c_str());
+ std::ios::openmode io_mode = std::ios::out | std::ios::trunc |
+ std::ios::binary;
+ std::ofstream Out(RealBytecodeOutput.c_str(), io_mode);
if (!Out.good())
return PrintAndReturn(argv[0], "error opening '" + RealBytecodeOutput +
"' for writing!");
More information about the llvm-commits
mailing list