diff options
author | Jeff Cohen <jeffc@jolt-lang.org> | 2005-01-22 17:36:17 +0000 |
---|---|---|
committer | Jeff Cohen <jeffc@jolt-lang.org> | 2005-01-22 17:36:17 +0000 |
commit | 5fb6ed4ae608c6f7ef589f1069b5dd5c7bdbd60b (patch) | |
tree | 1a699df0388afa1ed3d3acc4e4cd91085adbed10 /lib/Support | |
parent | 695c9bdbd0ad9d540dea68e201cd616afb4320d4 (diff) | |
download | external_llvm-5fb6ed4ae608c6f7ef589f1069b5dd5c7bdbd60b.zip external_llvm-5fb6ed4ae608c6f7ef589f1069b5dd5c7bdbd60b.tar.gz external_llvm-5fb6ed4ae608c6f7ef589f1069b5dd5c7bdbd60b.tar.bz2 |
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
Diffstat (limited to 'lib/Support')
-rw-r--r-- | lib/Support/FileUtilities.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Support/FileUtilities.cpp b/lib/Support/FileUtilities.cpp index 5255df6..234cf7d 100644 --- a/lib/Support/FileUtilities.cpp +++ b/lib/Support/FileUtilities.cpp @@ -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; |