mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-20 16:17:38 +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:
@@ -27,13 +27,14 @@ using namespace llvm;
|
||||
///
|
||||
bool llvm::DiffFiles(const std::string &FileA, const std::string &FileB,
|
||||
std::string *Error) {
|
||||
std::ifstream FileAStream(FileA.c_str());
|
||||
std::ios::openmode io_mode = std::ios::in | std::ios::binary;
|
||||
std::ifstream FileAStream(FileA.c_str(), io_mode);
|
||||
if (!FileAStream) {
|
||||
if (Error) *Error = "Couldn't open file '" + FileA + "'";
|
||||
return true;
|
||||
}
|
||||
|
||||
std::ifstream FileBStream(FileB.c_str());
|
||||
std::ifstream FileBStream(FileB.c_str(), io_mode);
|
||||
if (!FileBStream) {
|
||||
if (Error) *Error = "Couldn't open file '" + FileB + "'";
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user