forked from OSchip/llvm-project
[llvm-stress] Remove Rand32 helper function
To try and help avoid repeats of PR32585, remove Rand32 which is only called by Rand64 llvm-svn: 306285
This commit is contained in:
parent
f291c8d510
commit
3d116189c7
|
@ -96,17 +96,13 @@ public:
|
|||
return Seed & 0x7ffff;
|
||||
}
|
||||
|
||||
/// Return a random 32 bit integer.
|
||||
uint32_t Rand32() {
|
||||
uint32_t Val = Rand();
|
||||
Val &= 0xffff;
|
||||
return Val | (Rand() << 16);
|
||||
}
|
||||
|
||||
/// Return a random 64 bit integer.
|
||||
uint64_t Rand64() {
|
||||
uint64_t Val = Rand32();
|
||||
return Val | (uint64_t(Rand32()) << 32);
|
||||
uint64_t Val = Rand() & 0xffff;
|
||||
Val |= uint64_t(Rand() & 0xffff) << 16;
|
||||
Val |= uint64_t(Rand() & 0xffff) << 32;
|
||||
Val |= uint64_t(Rand() & 0xffff) << 48;
|
||||
return Val;
|
||||
}
|
||||
|
||||
/// Rand operator for STL algorithms.
|
||||
|
|
Loading…
Reference in New Issue