aboutsummaryrefslogtreecommitdiff
path: root/Basic/SourceManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Basic/SourceManager.cpp')
-rw-r--r--Basic/SourceManager.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Basic/SourceManager.cpp b/Basic/SourceManager.cpp
index 569c864dde..380edc0f93 100644
--- a/Basic/SourceManager.cpp
+++ b/Basic/SourceManager.cpp
@@ -13,6 +13,7 @@
#include "clang/Basic/SourceManager.h"
#include "clang/Basic/FileManager.h"
+#include "llvm/Config/config.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/System/Path.h"
@@ -66,7 +67,7 @@ static const MemoryBuffer *ReadFileFast(const FileEntry *FileEnt) {
FileEnt->getName());
char *BufPtr = const_cast<char*>(SB->getBufferStart());
-#if defined(_WIN32) || defined(_WIN64)
+#if defined(LLVM_ON_WIN32)
int FD = ::open(FileEnt->getName(), O_RDONLY|O_BINARY);
#else
int FD = ::open(FileEnt->getName(), O_RDONLY);