mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-18 11:24:01 +00:00
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
This commit is contained in:
@ -17,6 +17,7 @@
|
|||||||
#define DEBUG_TYPE "Data-stream"
|
#define DEBUG_TYPE "Data-stream"
|
||||||
#include "llvm/ADT/Statistic.h"
|
#include "llvm/ADT/Statistic.h"
|
||||||
#include "llvm/Support/DataStream.h"
|
#include "llvm/Support/DataStream.h"
|
||||||
|
#include "llvm/Support/Program.h"
|
||||||
#include "llvm/Support/system_error.h"
|
#include "llvm/Support/system_error.h"
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <cerrno>
|
#include <cerrno>
|
||||||
@ -69,8 +70,10 @@ public:
|
|||||||
#ifdef O_BINARY
|
#ifdef O_BINARY
|
||||||
OpenFlags |= O_BINARY; // Open input file in binary mode on win32.
|
OpenFlags |= O_BINARY; // Open input file in binary mode on win32.
|
||||||
#endif
|
#endif
|
||||||
if (Filename == "-")
|
if (Filename == "-") {
|
||||||
Fd = 0;
|
Fd = 0;
|
||||||
|
sys::Program::ChangeStdinToBinary();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
Fd = ::open(Filename.c_str(), OpenFlags);
|
Fd = ::open(Filename.c_str(), OpenFlags);
|
||||||
if (Fd == -1) return error_code(errno, posix_category());
|
if (Fd == -1) return error_code(errno, posix_category());
|
||||||
|
Reference in New Issue
Block a user