Fix the includes in lib/Fuzzer on Windows that have ordering
authorChandler Carruth <chandlerc@gmail.com>
Tue, 6 Jun 2017 23:28:01 +0000 (23:28 +0000)
committerMaria Guseva <m.guseva@samsung.com>
Tue, 11 Jul 2017 02:46:03 +0000 (11:46 +0900)
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

lib/Fuzzer/FuzzerExtFunctionsDlsymWin.cpp
lib/Fuzzer/FuzzerUtilWindows.cpp

index f6c7e07cc610b3491c7f1cf5508891a9145e4b68..321b3ec5d41405d245232f64d28c1ec7d8d5c761 100644 (file)
 
 #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() {
index 8d0678d7bf7d793775614731f27076d837df7c6c..25ac976fc2dbbc21850bcff08e0fba8f60313f6f 100644 (file)
@@ -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;