diff options
author | Daniel Dunbar <daniel@zuster.org> | 2012-05-05 16:36:20 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2012-05-05 16:36:20 +0000 |
commit | 9c69e6ae698f44703725eec8ff27630b6b81f0e3 (patch) | |
tree | 0410bec4b6aa9e2d68f436839fff332d018bdc46 /include | |
parent | e0b0e7b2950d3c132004105bba5f36a8eaea7925 (diff) | |
download | llvm-9c69e6ae698f44703725eec8ff27630b6b81f0e3.tar.gz llvm-9c69e6ae698f44703725eec8ff27630b6b81f0e3.tar.bz2 llvm-9c69e6ae698f44703725eec8ff27630b6b81f0e3.tar.xz |
[Support] Add sys::Process::GetRandomNumber().
- Primitive API, but we rarely have need for random numbers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156237 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Support/Process.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/llvm/Support/Process.h b/include/llvm/Support/Process.h index d796b7906d..91b92788f2 100644 --- a/include/llvm/Support/Process.h +++ b/include/llvm/Support/Process.h @@ -1,4 +1,4 @@ -//===- llvm/Support/Process.h ------------------------------------*- C++ -*-===// +//===- llvm/Support/Process.h -----------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -142,6 +142,10 @@ namespace sys { /// Resets the terminals colors, or returns an escape sequence to do so. static const char *ResetColor(); + + /// Get the result of a process wide random number generator. The + /// generator will be automatically seeded in non-deterministic fashion. + static unsigned GetRandomNumber(); /// @} }; } |