Index: llvm/trunk/lib/Fuzzer/FuzzerCorpus.h =================================================================== --- llvm/trunk/lib/Fuzzer/FuzzerCorpus.h +++ llvm/trunk/lib/Fuzzer/FuzzerCorpus.h @@ -12,14 +12,14 @@ #ifndef LLVM_FUZZER_CORPUS #define LLVM_FUZZER_CORPUS -#include -#include - #include "FuzzerDefs.h" #include "FuzzerIO.h" #include "FuzzerRandom.h" #include "FuzzerSHA1.h" #include "FuzzerTracePC.h" +#include +#include +#include namespace fuzzer { Index: llvm/trunk/lib/Fuzzer/FuzzerCrossOver.cpp =================================================================== --- llvm/trunk/lib/Fuzzer/FuzzerCrossOver.cpp +++ llvm/trunk/lib/Fuzzer/FuzzerCrossOver.cpp @@ -9,11 +9,10 @@ // Cross over test inputs. //===----------------------------------------------------------------------===// -#include - #include "FuzzerDefs.h" #include "FuzzerMutate.h" #include "FuzzerRandom.h" +#include namespace fuzzer { Index: llvm/trunk/lib/Fuzzer/FuzzerDefs.h =================================================================== --- llvm/trunk/lib/Fuzzer/FuzzerDefs.h +++ llvm/trunk/lib/Fuzzer/FuzzerDefs.h @@ -8,6 +8,7 @@ //===----------------------------------------------------------------------===// // Basic definitions. //===----------------------------------------------------------------------===// + #ifndef LLVM_FUZZER_DEFS_H #define LLVM_FUZZER_DEFS_H @@ -77,4 +78,5 @@ inline uint64_t Bswap(uint64_t x) { return __builtin_bswap64(x); } } // namespace fuzzer + #endif // LLVM_FUZZER_DEFS_H Index: llvm/trunk/lib/Fuzzer/FuzzerDictionary.h =================================================================== --- llvm/trunk/lib/Fuzzer/FuzzerDictionary.h +++ llvm/trunk/lib/Fuzzer/FuzzerDictionary.h @@ -122,4 +122,3 @@ } // namespace fuzzer #endif // LLVM_FUZZER_DICTIONARY_H - Index: llvm/trunk/lib/Fuzzer/FuzzerDriver.cpp =================================================================== --- llvm/trunk/lib/Fuzzer/FuzzerDriver.cpp +++ llvm/trunk/lib/Fuzzer/FuzzerDriver.cpp @@ -15,7 +15,6 @@ #include "FuzzerIO.h" #include "FuzzerMutate.h" #include "FuzzerRandom.h" - #include #include #include Index: llvm/trunk/lib/Fuzzer/FuzzerExtFunctions.h =================================================================== --- llvm/trunk/lib/Fuzzer/FuzzerExtFunctions.h +++ llvm/trunk/lib/Fuzzer/FuzzerExtFunctions.h @@ -8,6 +8,7 @@ //===----------------------------------------------------------------------===// // Defines an interface to (possibly optional) functions. //===----------------------------------------------------------------------===// + #ifndef LLVM_FUZZER_EXT_FUNCTIONS_H #define LLVM_FUZZER_EXT_FUNCTIONS_H @@ -30,4 +31,5 @@ #undef EXT_FUNC }; } // namespace fuzzer + #endif Index: llvm/trunk/lib/Fuzzer/FuzzerExtFunctionsDlsym.cpp =================================================================== --- llvm/trunk/lib/Fuzzer/FuzzerExtFunctionsDlsym.cpp +++ llvm/trunk/lib/Fuzzer/FuzzerExtFunctionsDlsym.cpp @@ -46,5 +46,7 @@ #undef EXT_FUNC } + } // namespace fuzzer + #endif // LIBFUZZER_APPLE Index: llvm/trunk/lib/Fuzzer/FuzzerExtFunctionsWeak.cpp =================================================================== --- llvm/trunk/lib/Fuzzer/FuzzerExtFunctionsWeak.cpp +++ llvm/trunk/lib/Fuzzer/FuzzerExtFunctionsWeak.cpp @@ -47,5 +47,7 @@ #undef EXT_FUNC } + } // namespace fuzzer + #endif // LIBFUZZER_LINUX Index: llvm/trunk/lib/Fuzzer/FuzzerExtFunctionsWeakAlias.cpp =================================================================== --- llvm/trunk/lib/Fuzzer/FuzzerExtFunctionsWeakAlias.cpp +++ llvm/trunk/lib/Fuzzer/FuzzerExtFunctionsWeakAlias.cpp @@ -50,5 +50,7 @@ #undef EXT_FUNC } + } // namespace fuzzer + #endif // LIBFUZZER_WINDOWS Index: llvm/trunk/lib/Fuzzer/FuzzerFnAdapter.h =================================================================== --- llvm/trunk/lib/Fuzzer/FuzzerFnAdapter.h +++ llvm/trunk/lib/Fuzzer/FuzzerFnAdapter.h @@ -15,10 +15,9 @@ #ifndef LLVM_FUZZER_ADAPTER_H #define LLVM_FUZZER_ADAPTER_H +#include #include #include - -#include #include #include #include Index: llvm/trunk/lib/Fuzzer/FuzzerIO.h =================================================================== --- llvm/trunk/lib/Fuzzer/FuzzerIO.h +++ llvm/trunk/lib/Fuzzer/FuzzerIO.h @@ -8,6 +8,7 @@ //===----------------------------------------------------------------------===// // IO interface. //===----------------------------------------------------------------------===// + #ifndef LLVM_FUZZER_IO_H #define LLVM_FUZZER_IO_H @@ -59,4 +60,5 @@ void DeleteFile(const std::string &Path); } // namespace fuzzer + #endif // LLVM_FUZZER_IO_H Index: llvm/trunk/lib/Fuzzer/FuzzerIO.cpp =================================================================== --- llvm/trunk/lib/Fuzzer/FuzzerIO.cpp +++ llvm/trunk/lib/Fuzzer/FuzzerIO.cpp @@ -8,6 +8,7 @@ //===----------------------------------------------------------------------===// // IO functions. //===----------------------------------------------------------------------===// + #include "FuzzerIO.h" #include "FuzzerDefs.h" #include "FuzzerExtFunctions.h" @@ -15,8 +16,8 @@ #include #include #include -#include #include +#include namespace fuzzer { Index: llvm/trunk/lib/Fuzzer/FuzzerIOPosix.cpp =================================================================== --- llvm/trunk/lib/Fuzzer/FuzzerIOPosix.cpp +++ llvm/trunk/lib/Fuzzer/FuzzerIOPosix.cpp @@ -8,9 +8,9 @@ //===----------------------------------------------------------------------===// // IO functions implementation using Posix API. //===----------------------------------------------------------------------===// - #include "FuzzerDefs.h" #if LIBFUZZER_POSIX + #include "FuzzerExtFunctions.h" #include "FuzzerIO.h" #include @@ -84,4 +84,5 @@ } } // namespace fuzzer + #endif // LIBFUZZER_POSIX Index: llvm/trunk/lib/Fuzzer/FuzzerIOWindows.cpp =================================================================== --- llvm/trunk/lib/Fuzzer/FuzzerIOWindows.cpp +++ llvm/trunk/lib/Fuzzer/FuzzerIOWindows.cpp @@ -8,9 +8,9 @@ //===----------------------------------------------------------------------===// // IO functions implementation for Windows. //===----------------------------------------------------------------------===// - #include "FuzzerDefs.h" #if LIBFUZZER_WINDOWS + #include "FuzzerExtFunctions.h" #include "FuzzerIO.h" #include @@ -18,8 +18,8 @@ #include #include #include -#include #include +#include #include namespace fuzzer { @@ -144,4 +144,5 @@ } } // namespace fuzzer + #endif // LIBFUZZER_WINDOWS Index: llvm/trunk/lib/Fuzzer/FuzzerInternal.h =================================================================== --- llvm/trunk/lib/Fuzzer/FuzzerInternal.h +++ llvm/trunk/lib/Fuzzer/FuzzerInternal.h @@ -12,19 +12,18 @@ #ifndef LLVM_FUZZER_INTERNAL_H #define LLVM_FUZZER_INTERNAL_H -#include -#include -#include -#include -#include -#include - #include "FuzzerDefs.h" #include "FuzzerExtFunctions.h" #include "FuzzerInterface.h" #include "FuzzerOptions.h" #include "FuzzerSHA1.h" #include "FuzzerValueBitMap.h" +#include +#include +#include +#include +#include +#include namespace fuzzer { Index: llvm/trunk/lib/Fuzzer/FuzzerLoop.cpp =================================================================== --- llvm/trunk/lib/Fuzzer/FuzzerLoop.cpp +++ llvm/trunk/lib/Fuzzer/FuzzerLoop.cpp @@ -15,7 +15,6 @@ #include "FuzzerMutate.h" #include "FuzzerRandom.h" #include "FuzzerTracePC.h" - #include #include #include Index: llvm/trunk/lib/Fuzzer/FuzzerSHA1.h =================================================================== --- llvm/trunk/lib/Fuzzer/FuzzerSHA1.h +++ llvm/trunk/lib/Fuzzer/FuzzerSHA1.h @@ -8,6 +8,7 @@ //===----------------------------------------------------------------------===// // SHA1 utils. //===----------------------------------------------------------------------===// + #ifndef LLVM_FUZZER_SHA1_H #define LLVM_FUZZER_SHA1_H @@ -28,4 +29,5 @@ std::string Hash(const Unit &U); } // namespace fuzzer + #endif // LLVM_FUZZER_SHA1_H Index: llvm/trunk/lib/Fuzzer/FuzzerTracePC.h =================================================================== --- llvm/trunk/lib/Fuzzer/FuzzerTracePC.h +++ llvm/trunk/lib/Fuzzer/FuzzerTracePC.h @@ -12,10 +12,9 @@ #ifndef LLVM_FUZZER_TRACE_PC #define LLVM_FUZZER_TRACE_PC -#include - #include "FuzzerDefs.h" #include "FuzzerValueBitMap.h" +#include namespace fuzzer { Index: llvm/trunk/lib/Fuzzer/FuzzerUtil.h =================================================================== --- llvm/trunk/lib/Fuzzer/FuzzerUtil.h +++ llvm/trunk/lib/Fuzzer/FuzzerUtil.h @@ -8,6 +8,7 @@ //===----------------------------------------------------------------------===// // Util functions. //===----------------------------------------------------------------------===// + #ifndef LLVM_FUZZER_UTIL_H #define LLVM_FUZZER_UTIL_H @@ -67,4 +68,5 @@ } } // namespace fuzzer + #endif // LLVM_FUZZER_UTIL_H Index: llvm/trunk/lib/Fuzzer/FuzzerUtilDarwin.cpp =================================================================== --- llvm/trunk/lib/Fuzzer/FuzzerUtilDarwin.cpp +++ llvm/trunk/lib/Fuzzer/FuzzerUtilDarwin.cpp @@ -10,6 +10,7 @@ //===----------------------------------------------------------------------===// #include "FuzzerDefs.h" #if LIBFUZZER_APPLE + #include "FuzzerIO.h" #include #include @@ -145,5 +146,7 @@ } return ProcessStatus; } -} + +} // namespace fuzzer + #endif // LIBFUZZER_APPLE Index: llvm/trunk/lib/Fuzzer/FuzzerUtilLinux.cpp =================================================================== --- llvm/trunk/lib/Fuzzer/FuzzerUtilLinux.cpp +++ llvm/trunk/lib/Fuzzer/FuzzerUtilLinux.cpp @@ -10,10 +10,15 @@ //===----------------------------------------------------------------------===// #include "FuzzerDefs.h" #if LIBFUZZER_LINUX + #include + namespace fuzzer { + int ExecuteCommand(const std::string &Command) { return system(Command.c_str()); } -} + +} // namespace fuzzer + #endif // LIBFUZZER_LINUX Index: llvm/trunk/lib/Fuzzer/FuzzerUtilPosix.cpp =================================================================== --- llvm/trunk/lib/Fuzzer/FuzzerUtilPosix.cpp +++ llvm/trunk/lib/Fuzzer/FuzzerUtilPosix.cpp @@ -8,7 +8,6 @@ //===----------------------------------------------------------------------===// // Misc utils implementation using Posix API. //===----------------------------------------------------------------------===// - #include "FuzzerDefs.h" #if LIBFUZZER_POSIX #include "FuzzerIO.h" @@ -113,5 +112,6 @@ return memmem(Data, DataLen, Patt, PattLen); } -} // namespace fuzzer +} // namespace fuzzer + #endif // LIBFUZZER_POSIX Index: llvm/trunk/lib/Fuzzer/FuzzerUtilWindows.cpp =================================================================== --- llvm/trunk/lib/Fuzzer/FuzzerUtilWindows.cpp +++ llvm/trunk/lib/Fuzzer/FuzzerUtilWindows.cpp @@ -8,7 +8,6 @@ //===----------------------------------------------------------------------===// // Misc utils implementation for Windows. //===----------------------------------------------------------------------===// - #include "FuzzerDefs.h" #if LIBFUZZER_WINDOWS #include "FuzzerIO.h" @@ -179,4 +178,5 @@ } } // namespace fuzzer + #endif // LIBFUZZER_WINDOWS