summaryrefslogtreecommitdiffstats
path: root/lib/Fuzzer
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2017-06-06 23:28:01 +0000
committerChandler Carruth <chandlerc@gmail.com>2017-06-06 23:28:01 +0000
commitb428c9ffd24c298a2316470205feffdc67bc82a5 (patch)
tree46bc4f0bbb4949106bdfd65521d32e6695b9cc8d /lib/Fuzzer
parentd1638eb7bef125e9017e5ba7b242299accc6972d (diff)
Fix the includes in lib/Fuzzer on Windows that have ordering
dependencies and add comments to tell future maintainers about those requirements. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304843 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Fuzzer')
-rw-r--r--lib/Fuzzer/FuzzerExtFunctionsDlsymWin.cpp4
-rw-r--r--lib/Fuzzer/FuzzerUtilWindows.cpp4
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/Fuzzer/FuzzerExtFunctionsDlsymWin.cpp b/lib/Fuzzer/FuzzerExtFunctionsDlsymWin.cpp
index f6c7e07cc610..321b3ec5d414 100644
--- a/lib/Fuzzer/FuzzerExtFunctionsDlsymWin.cpp
+++ b/lib/Fuzzer/FuzzerExtFunctionsDlsymWin.cpp
@@ -13,9 +13,11 @@
#include "FuzzerExtFunctions.h"
#include "FuzzerIO.h"
-#include "Psapi.h"
#include "Windows.h"
+// This must be included after Windows.h.
+#include "Psapi.h"
+
namespace fuzzer {
ExternalFunctions::ExternalFunctions() {
diff --git a/lib/Fuzzer/FuzzerUtilWindows.cpp b/lib/Fuzzer/FuzzerUtilWindows.cpp
index 8d0678d7bf7d..25ac976fc2db 100644
--- a/lib/Fuzzer/FuzzerUtilWindows.cpp
+++ b/lib/Fuzzer/FuzzerUtilWindows.cpp
@@ -12,7 +12,6 @@
#if LIBFUZZER_WINDOWS
#include "FuzzerIO.h"
#include "FuzzerInternal.h"
-#include <Psapi.h>
#include <cassert>
#include <chrono>
#include <cstring>
@@ -24,6 +23,9 @@
#include <sys/types.h>
#include <windows.h>
+// This must be included after windows.h.
+#include <Psapi.h>
+
namespace fuzzer {
static const FuzzingOptions* HandlerOpt = nullptr;