From: Chandler Carruth Date: Tue, 6 Jun 2017 23:28:01 +0000 (+0000) Subject: Fix the includes in lib/Fuzzer on Windows that have ordering X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b428c9ffd24c298a2316470205feffdc67bc82a5;p=llvm 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 --- diff --git a/lib/Fuzzer/FuzzerExtFunctionsDlsymWin.cpp b/lib/Fuzzer/FuzzerExtFunctionsDlsymWin.cpp index f6c7e07cc61..321b3ec5d41 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 8d0678d7bf7..25ac976fc2d 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 #include #include #include @@ -24,6 +23,9 @@ #include #include +// This must be included after windows.h. +#include + namespace fuzzer { static const FuzzingOptions* HandlerOpt = nullptr;