From: Kostya Serebryany Date: Wed, 21 Sep 2016 21:17:23 +0000 (+0000) Subject: [libFuzzer] more refactoring X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e52f15bf1a9968d98fa1fbc7971c0feab344a7f4;p=llvm [libFuzzer] more refactoring git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282113 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Fuzzer/FuzzerDefs.h b/lib/Fuzzer/FuzzerDefs.h index fa8ef57d70a..b871771fab2 100644 --- a/lib/Fuzzer/FuzzerDefs.h +++ b/lib/Fuzzer/FuzzerDefs.h @@ -14,6 +14,7 @@ #include #include #include +#include #include #include diff --git a/lib/Fuzzer/FuzzerExtFunctionsDlsym.cpp b/lib/Fuzzer/FuzzerExtFunctionsDlsym.cpp index 7b9681a6193..78d8de7e023 100644 --- a/lib/Fuzzer/FuzzerExtFunctionsDlsym.cpp +++ b/lib/Fuzzer/FuzzerExtFunctionsDlsym.cpp @@ -11,7 +11,7 @@ // requires that clients of LibFuzzer pass ``--export-dynamic`` to the linker. // That is a complication we don't wish to expose to clients right now. //===----------------------------------------------------------------------===// -#include "FuzzerInternal.h" +#include "FuzzerDefs.h" #if LIBFUZZER_APPLE #include "FuzzerExtFunctions.h" diff --git a/lib/Fuzzer/FuzzerExtFunctionsWeak.cpp b/lib/Fuzzer/FuzzerExtFunctionsWeak.cpp index 75c0ed9f830..cd4371ad44f 100644 --- a/lib/Fuzzer/FuzzerExtFunctionsWeak.cpp +++ b/lib/Fuzzer/FuzzerExtFunctionsWeak.cpp @@ -12,7 +12,7 @@ // weak symbols to be undefined. That is a complication we don't want to expose // to clients right now. //===----------------------------------------------------------------------===// -#include "FuzzerInternal.h" +#include "FuzzerDefs.h" #if LIBFUZZER_LINUX #include "FuzzerExtFunctions.h" diff --git a/lib/Fuzzer/FuzzerSHA1.cpp b/lib/Fuzzer/FuzzerSHA1.cpp index b42a04854cd..cab81a404db 100644 --- a/lib/Fuzzer/FuzzerSHA1.cpp +++ b/lib/Fuzzer/FuzzerSHA1.cpp @@ -16,7 +16,7 @@ // For the same reason we do not want to depend on SHA1 from LLVM tree. //===----------------------------------------------------------------------===// -#include "FuzzerInternal.h" +#include "FuzzerDefs.h" /* This code is public-domain - it is based on libcrypt * placed in the public domain by Wei Dai and other contributors. diff --git a/lib/Fuzzer/FuzzerTracePC.cpp b/lib/Fuzzer/FuzzerTracePC.cpp index 9daa721cfbc..4d962d31e78 100644 --- a/lib/Fuzzer/FuzzerTracePC.cpp +++ b/lib/Fuzzer/FuzzerTracePC.cpp @@ -12,8 +12,9 @@ // //===----------------------------------------------------------------------===// -#include "FuzzerInternal.h" +#include "FuzzerDefs.h" #include "FuzzerTracePC.h" +#include "FuzzerValueBitMap.h" namespace fuzzer { diff --git a/lib/Fuzzer/FuzzerTracePC.h b/lib/Fuzzer/FuzzerTracePC.h index 2ba0808c8ce..58497f1e9f5 100644 --- a/lib/Fuzzer/FuzzerTracePC.h +++ b/lib/Fuzzer/FuzzerTracePC.h @@ -13,6 +13,7 @@ #define LLVM_FUZZER_TRACE_PC #include "FuzzerDefs.h" +#include "FuzzerValueBitMap.h" namespace fuzzer { diff --git a/lib/Fuzzer/FuzzerUtilDarwin.cpp b/lib/Fuzzer/FuzzerUtilDarwin.cpp index ab25ffbe50c..4c90998c897 100644 --- a/lib/Fuzzer/FuzzerUtilDarwin.cpp +++ b/lib/Fuzzer/FuzzerUtilDarwin.cpp @@ -8,7 +8,7 @@ //===----------------------------------------------------------------------===// // Misc utils for Darwin. //===----------------------------------------------------------------------===// -#include "FuzzerInternal.h" +#include "FuzzerDefs.h" #if LIBFUZZER_APPLE #include #include diff --git a/lib/Fuzzer/FuzzerUtilLinux.cpp b/lib/Fuzzer/FuzzerUtilLinux.cpp index f18e471717b..e63c7d9a07f 100644 --- a/lib/Fuzzer/FuzzerUtilLinux.cpp +++ b/lib/Fuzzer/FuzzerUtilLinux.cpp @@ -8,7 +8,7 @@ //===----------------------------------------------------------------------===// // Misc utils for Linux. //===----------------------------------------------------------------------===// -#include "FuzzerInternal.h" +#include "FuzzerDefs.h" #if LIBFUZZER_LINUX #include namespace fuzzer { diff --git a/lib/Fuzzer/FuzzerValueBitMap.h b/lib/Fuzzer/FuzzerValueBitMap.h index 6f6ca116473..07e52fc5a54 100644 --- a/lib/Fuzzer/FuzzerValueBitMap.h +++ b/lib/Fuzzer/FuzzerValueBitMap.h @@ -12,6 +12,8 @@ #ifndef LLVM_FUZZER_VALUE_BIT_MAP_H #define LLVM_FUZZER_VALUE_BIT_MAP_H +#include "FuzzerDefs.h" + namespace fuzzer { // A bit map containing kMapSizeInWords bits. diff --git a/lib/Fuzzer/test/fuzzer-printcovpcs.test b/lib/Fuzzer/test/fuzzer-printcovpcs.test index 9936edd6c3b..721e50dcbe7 100644 --- a/lib/Fuzzer/test/fuzzer-printcovpcs.test +++ b/lib/Fuzzer/test/fuzzer-printcovpcs.test @@ -1,5 +1,5 @@ -RUN: LLVMFuzzer-SimpleTest -print_pcs=1 2>&1 | FileCheck %s --check-prefix=PCS -RUN: LLVMFuzzer-SimpleTest-TracePC -print_pcs=1 2>&1 | FileCheck %s --check-prefix=PCS +RUN: LLVMFuzzer-SimpleTest -print_pcs=1 -seed=1 2>&1 | FileCheck %s --check-prefix=PCS +RUN: LLVMFuzzer-SimpleTest-TracePC -print_pcs=1 -seed=1 2>&1 | FileCheck %s --check-prefix=PCS PCS-NOT: NEW_PC PCS:INITED PCS:NEW_PC: {{0x[a-f0-9]+}}