diff options
author | Derek Schuff <dschuff@google.com> | 2012-02-07 00:28:46 +0000 |
---|---|---|
committer | Derek Schuff <dschuff@google.com> | 2012-02-07 00:28:46 +0000 |
commit | eb446511ce5f1761962f12f1e8a0c7b342733d1c (patch) | |
tree | fa7e0e522d93bcb99206fb66b2a6a2b0c141f985 | |
parent | 3901c3e75009f2ec7b4e67c354170dadab9e5a02 (diff) | |
download | external_llvm-eb446511ce5f1761962f12f1e8a0c7b342733d1c.zip external_llvm-eb446511ce5f1761962f12f1e8a0c7b342733d1c.tar.gz external_llvm-eb446511ce5f1761962f12f1e8a0c7b342733d1c.tar.bz2 |
Fix win32 build breakage from bitcode streaming patch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149941 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Support/DataStream.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Support/DataStream.cpp b/lib/Support/DataStream.cpp index 6b4cb64..b2dd979 100644 --- a/lib/Support/DataStream.cpp +++ b/lib/Support/DataStream.cpp @@ -17,6 +17,7 @@ #define DEBUG_TYPE "Data-stream" #include "llvm/ADT/Statistic.h" #include "llvm/Support/DataStream.h" +#include "llvm/Support/Program.h" #include "llvm/Support/system_error.h" #include <string> #include <cerrno> @@ -69,8 +70,10 @@ public: #ifdef O_BINARY OpenFlags |= O_BINARY; // Open input file in binary mode on win32. #endif - if (Filename == "-") + if (Filename == "-") { Fd = 0; + sys::Program::ChangeStdinToBinary(); + } else Fd = ::open(Filename.c_str(), OpenFlags); if (Fd == -1) return error_code(errno, posix_category()); |