Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Unified Diff: src/IceGlobalContext.h

Issue 455593004: Subzero: Add a random number generator. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Rebase Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Makefile.standalone ('k') | src/IceGlobalContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceGlobalContext.h
diff --git a/src/IceGlobalContext.h b/src/IceGlobalContext.h
index 2acb8dea2390510c23c40aadf48d2110f2a6ce19..b67a232fc658770fb49b580f99add84c23812346 100644
--- a/src/IceGlobalContext.h
+++ b/src/IceGlobalContext.h
@@ -21,6 +21,7 @@
#include "IceDefs.h"
#include "IceIntrinsics.h"
+#include "IceRNG.h"
#include "IceTypes.h"
namespace Ice {
@@ -95,6 +96,10 @@ public:
const Intrinsics &getIntrinsicsInfo() const { return IntrinsicsInfo; }
+ // TODO(wala,stichnot): Make the RNG play nicely with multithreaded
+ // translation.
+ RandomNumberGenerator &getRNG() { return RNG; }
+
private:
Ostream *StrDump; // Stream for dumping / diagnostics
Ostream *StrEmit; // Stream for code emission
@@ -108,6 +113,7 @@ private:
const IceString TestPrefix;
const ClFlags &Flags;
bool HasEmittedFirstMethod;
+ RandomNumberGenerator RNG;
GlobalContext(const GlobalContext &) LLVM_DELETED_FUNCTION;
GlobalContext &operator=(const GlobalContext &) LLVM_DELETED_FUNCTION;
« no previous file with comments | « Makefile.standalone ('k') | src/IceGlobalContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698