summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Fuzzer/FuzzerInterface.cpp
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2015-09-03 21:24:19 +0000
committerKostya Serebryany <kcc@google.com>2015-09-03 21:24:19 +0000
commitec2dcb1d914572b87eaf2afff9ecc1898bac9070 (patch)
tree5ed9c6715c9ae8cf6f31bee9982f6c151a03b84c /llvm/lib/Fuzzer/FuzzerInterface.cpp
parentf11bc761d80a3586e155825ce4ee98e3ba553394 (diff)
downloadbcm5719-llvm-ec2dcb1d914572b87eaf2afff9ecc1898bac9070.tar.gz
bcm5719-llvm-ec2dcb1d914572b87eaf2afff9ecc1898bac9070.zip
[libFuzzer] refactor the mutation functions so that they are now methods of a class. NFC
llvm-svn: 246808
Diffstat (limited to 'llvm/lib/Fuzzer/FuzzerInterface.cpp')
-rw-r--r--llvm/lib/Fuzzer/FuzzerInterface.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Fuzzer/FuzzerInterface.cpp b/llvm/lib/Fuzzer/FuzzerInterface.cpp
index 5df182ec595..231e757c8b2 100644
--- a/llvm/lib/Fuzzer/FuzzerInterface.cpp
+++ b/llvm/lib/Fuzzer/FuzzerInterface.cpp
@@ -20,9 +20,10 @@ void FuzzerRandomLibc::ResetSeed(int seed) { srand(seed); }
size_t FuzzerRandomLibc::Rand() { return rand(); }
UserSuppliedFuzzer::UserSuppliedFuzzer()
- : OwnRand(true), Rand(new FuzzerRandomLibc(0)) {}
+ : OwnRand(true), Rand(new FuzzerRandomLibc(0)), MD(*Rand) {}
-UserSuppliedFuzzer::UserSuppliedFuzzer(FuzzerRandomBase *Rand) : Rand(Rand) {}
+UserSuppliedFuzzer::UserSuppliedFuzzer(FuzzerRandomBase *Rand)
+ : Rand(Rand), MD(*Rand) {}
UserSuppliedFuzzer::~UserSuppliedFuzzer() {
if (OwnRand)
OpenPOWER on IntegriCloud