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

Unified Diff: src/IceGlobalContext.h

Issue 1221643012: Subzero: Add -Wshadow to the build. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Change the previous underscore naming style Created 5 years, 6 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
Index: src/IceGlobalContext.h
diff --git a/src/IceGlobalContext.h b/src/IceGlobalContext.h
index 1e23a36381546ef0ab303e0a276f01fb4e19bc75..1179845be86ccc15a538d0bc70a08c03efe10c9e 100644
--- a/src/IceGlobalContext.h
+++ b/src/IceGlobalContext.h
@@ -45,7 +45,7 @@ template <typename T> class LockedPtr {
LockedPtr &operator=(const LockedPtr &) = delete;
public:
- LockedPtr(T *Value, GlobalLockType *Lock) : Value(Value), Lock(Lock) {
+ LockedPtr(T *MyValue, GlobalLockType *MyLock) : Value(MyValue), Lock(MyLock) {
Lock->lock();
}
LockedPtr(LockedPtr &&Other) : Value(Other.Value), Lock(Other.Lock) {
@@ -340,25 +340,25 @@ public:
void initParserThread() {
ThreadContext *Tls = new ThreadContext();
- auto Timers = getTimers();
- Timers->initInto(Tls->Timers);
+ auto MyTimers = getTimers();
+ MyTimers->initInto(Tls->Timers);
AllThreadContexts.push_back(Tls);
ICE_TLS_SET_FIELD(TLS, Tls);
}
void startWorkerThreads() {
size_t NumWorkers = getFlags().getNumTranslationThreads();
- auto Timers = getTimers();
+ auto MyTimers = getTimers();
for (size_t i = 0; i < NumWorkers; ++i) {
ThreadContext *WorkerTLS = new ThreadContext();
- Timers->initInto(WorkerTLS->Timers);
+ MyTimers->initInto(WorkerTLS->Timers);
AllThreadContexts.push_back(WorkerTLS);
TranslationThreads.push_back(std::thread(
&GlobalContext::translateFunctionsWrapper, this, WorkerTLS));
}
if (NumWorkers) {
ThreadContext *WorkerTLS = new ThreadContext();
- Timers->initInto(WorkerTLS->Timers);
+ MyTimers->initInto(WorkerTLS->Timers);
AllThreadContexts.push_back(WorkerTLS);
EmitterThreads.push_back(
std::thread(&GlobalContext::emitterWrapper, this, WorkerTLS));
@@ -381,9 +381,9 @@ public:
EmitterThreads.clear();
if (BuildDefs::dump()) {
- auto Timers = getTimers();
+ auto MyTimers = getTimers();
for (ThreadContext *TLS : AllThreadContexts)
- Timers->mergeFrom(TLS->Timers);
+ MyTimers->mergeFrom(TLS->Timers);
}
if (BuildDefs::dump()) {
// Do a separate loop over AllThreadContexts to avoid holding
@@ -557,15 +557,15 @@ class TimerMarker {
TimerMarker &operator=(const TimerMarker &) = delete;
public:
- TimerMarker(TimerIdT ID, GlobalContext *Ctx,
- TimerStackIdT StackID = GlobalContext::TSK_Default)
- : ID(ID), Ctx(Ctx), StackID(StackID) {
+ TimerMarker(TimerIdT MyID, GlobalContext *MyCtx,
+ TimerStackIdT MyStackID = GlobalContext::TSK_Default)
+ : ID(MyID), Ctx(MyCtx), StackID(MyStackID) {
if (BuildDefs::dump())
push();
}
- TimerMarker(TimerIdT ID, const Cfg *Func,
- TimerStackIdT StackID = GlobalContext::TSK_Default)
- : ID(ID), Ctx(nullptr), StackID(StackID) {
+ TimerMarker(TimerIdT MyID, const Cfg *Func,
+ TimerStackIdT MyStackID = GlobalContext::TSK_Default)
+ : ID(MyID), Ctx(nullptr), StackID(MyStackID) {
// Ctx gets set at the beginning of pushCfg().
if (BuildDefs::dump())
pushCfg(Func);
@@ -594,7 +594,7 @@ private:
OstreamLocker &operator=(const OstreamLocker &) = delete;
public:
- explicit OstreamLocker(GlobalContext *Ctx) : Ctx(Ctx) { Ctx->lockStr(); }
+ explicit OstreamLocker(GlobalContext *MyCtx) : Ctx(MyCtx) { Ctx->lockStr(); }
~OstreamLocker() { Ctx->unlockStr(); }
private:

Powered by Google App Engine
This is Rietveld 408576698