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

Unified Diff: src/IceTimerTree.cpp

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/IceTimerTree.cpp
diff --git a/src/IceTimerTree.cpp b/src/IceTimerTree.cpp
index 818efc30bb4b2e389d98aaca57301f0d88685965..69611be794bddd03f09adca0a9f5f6c2db7565f1 100644
--- a/src/IceTimerTree.cpp
+++ b/src/IceTimerTree.cpp
@@ -19,13 +19,14 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-parameter"
+#pragma clang diagnostic ignored "-Wshadow"
#include "llvm/Support/Timer.h"
#pragma clang diagnostic pop
namespace Ice {
-TimerStack::TimerStack(const IceString &Name)
- : Name(Name), FirstTimestamp(timestamp()), LastTimestamp(FirstTimestamp) {
+TimerStack::TimerStack(const IceString &MyName)
+ : Name(MyName), FirstTimestamp(timestamp()), LastTimestamp(FirstTimestamp) {
if (!BuildDefs::dump())
return;
Nodes.resize(1); // Reserve Nodes[0] for the root node (sentinel).
@@ -43,16 +44,16 @@ TimerStack::TimerStack(const IceString &Name)
// Returns the unique timer ID for the given Name, creating a new ID
// if needed.
-TimerIdT TimerStack::getTimerID(const IceString &Name) {
+TimerIdT TimerStack::getTimerID(const IceString &MyName) {
if (!BuildDefs::dump())
return 0;
- if (IDsIndex.find(Name) == IDsIndex.end()) {
- IDsIndex[Name] = IDs.size();
- IDs.push_back(Name);
+ if (IDsIndex.find(MyName) == IDsIndex.end()) {
+ IDsIndex[MyName] = IDs.size();
+ IDs.push_back(MyName);
LeafTimes.push_back(decltype(LeafTimes)::value_type());
LeafCounts.push_back(decltype(LeafCounts)::value_type());
}
- return IDsIndex[Name];
+ return IDsIndex[MyName];
}
// Creates a mapping from TimerIdT (leaf) values in the Src timer
« src/IceInst.h ('K') | « src/IceThreading.h ('k') | src/IceTranslator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698