summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2012-05-05 16:36:20 +0000
committerDaniel Dunbar <daniel@zuster.org>2012-05-05 16:36:20 +0000
commitb57ddd4e292cb3a2ef8d2ded445c5b4b79f7c864 (patch)
tree0eac2743805d5330d4ba492403aa36ea130d5790 /llvm/include
parent407a85e7a6c889ea4f561b7b0daee30d4bb0d865 (diff)
downloadbcm5719-llvm-b57ddd4e292cb3a2ef8d2ded445c5b4b79f7c864.tar.gz
bcm5719-llvm-b57ddd4e292cb3a2ef8d2ded445c5b4b79f7c864.zip
[Support] Add sys::Process::GetRandomNumber().
- Primitive API, but we rarely have need for random numbers. llvm-svn: 156237
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/Support/Process.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/include/llvm/Support/Process.h b/llvm/include/llvm/Support/Process.h
index d796b7906d3..91b92788f2c 100644
--- a/llvm/include/llvm/Support/Process.h
+++ b/llvm/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();
/// @}
};
}
OpenPOWER on IntegriCloud