| Index: src/IceRNG.cpp
|
| diff --git a/src/IceRNG.cpp b/src/IceRNG.cpp
|
| index 03171ad432f3fab5736971fac8cec3a4720bcb34..43c7f07de7969e3cab78f3c632315eda336b0586 100644
|
| --- a/src/IceRNG.cpp
|
| +++ b/src/IceRNG.cpp
|
| @@ -13,24 +13,12 @@
|
|
|
| #include <time.h>
|
|
|
| -#include "llvm/Support/CommandLine.h"
|
| -
|
| #include "IceRNG.h"
|
|
|
| namespace Ice {
|
|
|
| namespace {
|
| -namespace cl = llvm::cl;
|
| -
|
| -// TODO(stichnot): See if we can easily use LLVM's -rng-seed option
|
| -// and implementation. I expect the implementation is different and
|
| -// therefore the tests would need to be changed.
|
| -cl::opt<unsigned long long>
|
| - RandomSeed("sz-seed", cl::desc("Seed the random number generator"),
|
| - cl::init(time(0)));
|
| -
|
| const unsigned MAX = 2147483647;
|
| -
|
| } // end of anonymous namespace
|
|
|
| // TODO(wala,stichnot): Switch to RNG implementation from LLVM or C++11.
|
| @@ -39,8 +27,8 @@ const unsigned MAX = 2147483647;
|
| // subsequent run, for reproducing a bug. Print the seed in a comment
|
| // in the asm output. Embed the seed in the binary via metadata that an
|
| // attacker can't introspect.
|
| -RandomNumberGenerator::RandomNumberGenerator(llvm::StringRef)
|
| - : State(RandomSeed) {}
|
| +RandomNumberGenerator::RandomNumberGenerator(uint64_t Seed, llvm::StringRef)
|
| + : State(Seed) {}
|
|
|
| uint64_t RandomNumberGenerator::next(uint64_t Max) {
|
| // Lewis, Goodman, and Miller (1969)
|
|
|