mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-22 20:20:03 +00:00
b33343ddb1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251133 91177308-0d34-0410-b5e6-96231b3b80d8
31 lines
857 B
C++
31 lines
857 B
C++
//===- FuzzerInterface.cpp - Mutate a test input --------------------------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
// Parts of public interface for libFuzzer.
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
#include "FuzzerInterface.h"
|
|
#include "FuzzerInternal.h"
|
|
|
|
namespace fuzzer {
|
|
|
|
void FuzzerRandomLibc::ResetSeed(int seed) { srand(seed); }
|
|
|
|
size_t FuzzerRandomLibc::Rand() { return rand(); }
|
|
|
|
UserSuppliedFuzzer::UserSuppliedFuzzer(FuzzerRandomBase *Rand)
|
|
: Rand(Rand), MD(*Rand) {}
|
|
|
|
UserSuppliedFuzzer::~UserSuppliedFuzzer() {
|
|
if (OwnRand)
|
|
delete Rand;
|
|
}
|
|
|
|
} // namespace fuzzer.
|