Subzero: Add a random number generator.
This is inital work necessary for diversification support in Subzero.
The random number generator implementation is temporary. It will
eventually use a cryptographically secure pseudorandom number
generator (perhaps from LLVM, if LLVM gets one).
Add the -rng-seed= option to seed the random number generator from
the command line.
BUG=none
R=stichnot@chromium.org
Review URL: https://codereview.chromium.org/455593004
diff --git a/src/IceGlobalContext.cpp b/src/IceGlobalContext.cpp
index 745f0d4..5f9b620 100644
--- a/src/IceGlobalContext.cpp
+++ b/src/IceGlobalContext.cpp
@@ -120,7 +120,8 @@
IceString TestPrefix, const ClFlags &Flags)
: StrDump(OsDump), StrEmit(OsEmit), VMask(Mask),
ConstPool(new ConstantPool()), Arch(Arch), Opt(Opt),
- TestPrefix(TestPrefix), Flags(Flags), HasEmittedFirstMethod(false) {}
+ TestPrefix(TestPrefix), Flags(Flags), HasEmittedFirstMethod(false),
+ RNG("") {}
// Scan a string for S[0-9A-Z]*_ patterns and replace them with
// S<num>_ where <num> is the next base-36 value. If a type name