Skip to content
This repository was archived by the owner on Mar 28, 2020. It is now read-only.

Commit e52f15b

Browse files
committed
[libFuzzer] more refactoring
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282113 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent e10e0e3 commit e52f15b

10 files changed

+13
-8
lines changed

lib/Fuzzer/FuzzerDefs.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include <cassert>
1515
#include <cstddef>
1616
#include <cstdint>
17+
#include <cstring>
1718
#include <string>
1819
#include <vector>
1920

lib/Fuzzer/FuzzerExtFunctionsDlsym.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// requires that clients of LibFuzzer pass ``--export-dynamic`` to the linker.
1212
// That is a complication we don't wish to expose to clients right now.
1313
//===----------------------------------------------------------------------===//
14-
#include "FuzzerInternal.h"
14+
#include "FuzzerDefs.h"
1515
#if LIBFUZZER_APPLE
1616

1717
#include "FuzzerExtFunctions.h"

lib/Fuzzer/FuzzerExtFunctionsWeak.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// weak symbols to be undefined. That is a complication we don't want to expose
1313
// to clients right now.
1414
//===----------------------------------------------------------------------===//
15-
#include "FuzzerInternal.h"
15+
#include "FuzzerDefs.h"
1616
#if LIBFUZZER_LINUX
1717

1818
#include "FuzzerExtFunctions.h"

lib/Fuzzer/FuzzerSHA1.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
// For the same reason we do not want to depend on SHA1 from LLVM tree.
1717
//===----------------------------------------------------------------------===//
1818

19-
#include "FuzzerInternal.h"
19+
#include "FuzzerDefs.h"
2020

2121
/* This code is public-domain - it is based on libcrypt
2222
* placed in the public domain by Wei Dai and other contributors.

lib/Fuzzer/FuzzerTracePC.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@
1212
//
1313
//===----------------------------------------------------------------------===//
1414

15-
#include "FuzzerInternal.h"
15+
#include "FuzzerDefs.h"
1616
#include "FuzzerTracePC.h"
17+
#include "FuzzerValueBitMap.h"
1718

1819
namespace fuzzer {
1920

lib/Fuzzer/FuzzerTracePC.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#define LLVM_FUZZER_TRACE_PC
1414

1515
#include "FuzzerDefs.h"
16+
#include "FuzzerValueBitMap.h"
1617

1718
namespace fuzzer {
1819

lib/Fuzzer/FuzzerUtilDarwin.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
//===----------------------------------------------------------------------===//
99
// Misc utils for Darwin.
1010
//===----------------------------------------------------------------------===//
11-
#include "FuzzerInternal.h"
11+
#include "FuzzerDefs.h"
1212
#if LIBFUZZER_APPLE
1313
#include <mutex>
1414
#include <signal.h>

lib/Fuzzer/FuzzerUtilLinux.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
//===----------------------------------------------------------------------===//
99
// Misc utils for Linux.
1010
//===----------------------------------------------------------------------===//
11-
#include "FuzzerInternal.h"
11+
#include "FuzzerDefs.h"
1212
#if LIBFUZZER_LINUX
1313
#include <stdlib.h>
1414
namespace fuzzer {

lib/Fuzzer/FuzzerValueBitMap.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
#ifndef LLVM_FUZZER_VALUE_BIT_MAP_H
1313
#define LLVM_FUZZER_VALUE_BIT_MAP_H
1414

15+
#include "FuzzerDefs.h"
16+
1517
namespace fuzzer {
1618

1719
// A bit map containing kMapSizeInWords bits.

lib/Fuzzer/test/fuzzer-printcovpcs.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
RUN: LLVMFuzzer-SimpleTest -print_pcs=1 2>&1 | FileCheck %s --check-prefix=PCS
2-
RUN: LLVMFuzzer-SimpleTest-TracePC -print_pcs=1 2>&1 | FileCheck %s --check-prefix=PCS
1+
RUN: LLVMFuzzer-SimpleTest -print_pcs=1 -seed=1 2>&1 | FileCheck %s --check-prefix=PCS
2+
RUN: LLVMFuzzer-SimpleTest-TracePC -print_pcs=1 -seed=1 2>&1 | FileCheck %s --check-prefix=PCS
33
PCS-NOT: NEW_PC
44
PCS:INITED
55
PCS:NEW_PC: {{0x[a-f0-9]+}}

0 commit comments

Comments
 (0)