aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Frontend/CompilerInstance.cpp3
-rw-r--r--tools/libclang/CIndex.cpp10
2 files changed, 10 insertions, 3 deletions
diff --git a/lib/Frontend/CompilerInstance.cpp b/lib/Frontend/CompilerInstance.cpp
index 8b6251e6e7..84df382e27 100644
--- a/lib/Frontend/CompilerInstance.cpp
+++ b/lib/Frontend/CompilerInstance.cpp
@@ -48,12 +48,9 @@
#include <fstream>
#include <sys/types.h>
#include <sys/stat.h>
-#include <cstdlib>
#if LLVM_ON_WIN32
#include <windows.h>
-#include <io.h>
-#include <fcntl.h>
#endif
#if LLVM_ON_UNIX
#include <unistd.h>
diff --git a/tools/libclang/CIndex.cpp b/tools/libclang/CIndex.cpp
index bccd927ca2..386921c49e 100644
--- a/tools/libclang/CIndex.cpp
+++ b/tools/libclang/CIndex.cpp
@@ -46,6 +46,16 @@
#include "llvm/Support/Signals.h"
#include "llvm/Support/Threading.h"
#include "llvm/Support/Compiler.h"
+#include <cstdlib>
+
+#if LLVM_ON_WIN32
+#include <windows.h>
+#include <io.h>
+#include <fcntl.h>
+#endif
+#if LLVM_ON_UNIX
+#include <unistd.h>
+#endif
using namespace clang;
using namespace clang::cxcursor;