[libFuzzer] refactor the mutation functions so that they are now methods of a class...
[oota-llvm.git] / lib / Fuzzer / FuzzerInterface.cpp
index 5df182ec59524cd81893dcea8b1e7ef3c06bb44f..231e757c8b26a7d6aca9ec09f517e19f09b92085 100644 (file)
@@ -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)