mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 12:43:36 +01:00
ea27e92765
Differential Revision: http://reviews.llvm.org/D15339 done llvm-svn: 255296
31 lines
866 B
C++
31 lines
866 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(unsigned 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.
|