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

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: Code review changes Created 5 years, 5 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 d19249d40c2f9aaa6bedf2b27a2b4e328abb4914..6d9e73659d9ededc3effa2686524d71673c29b50 100644
--- a/src/IceGlobalContext.h
+++ b/src/IceGlobalContext.h
@@ -46,7 +46,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) {
@@ -341,25 +341,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));
@@ -382,9 +382,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
@@ -558,15 +558,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);
@@ -595,7 +595,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