mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-28 06:24:57 +00:00
Use binary mode for reading/writing bytecode files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19751 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -186,7 +186,9 @@ static void RemoveEnv(const char * name, char ** const envp) {
|
||||
void GenerateBytecode(Module* M, const std::string& FileName) {
|
||||
|
||||
// Create the output file.
|
||||
std::ofstream Out(FileName.c_str());
|
||||
std::ios::openmode io_mode = std::ios::out | std::ios::trunc |
|
||||
std::ios::binary;
|
||||
std::ofstream Out(FileName.c_str(), io_mode);
|
||||
if (!Out.good()) {
|
||||
PrintAndReturn("error opening '" + FileName + "' for writing!");
|
||||
return;
|
||||
|
Reference in New Issue
Block a user