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

Unified Diff: src/IceInst.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
« src/IceInst.h ('K') | « src/IceInst.h ('k') | src/IceInstARM32.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceInst.cpp
diff --git a/src/IceInst.cpp b/src/IceInst.cpp
index ecfb1b660f4e5327088373336e9a1582459fa208..b131c2851dd4b17833ad347f30ea95b019f2959f 100644
--- a/src/IceInst.cpp
+++ b/src/IceInst.cpp
@@ -71,9 +71,10 @@ const struct InstIcmpAttributes_ {
} // end of anonymous namespace
-Inst::Inst(Cfg *Func, InstKind Kind, SizeT MaxSrcs, Variable *Dest)
- : Kind(Kind), Number(Func->newInstNumber()), Dest(Dest), MaxSrcs(MaxSrcs),
- Srcs(Func->allocateArrayOf<Operand *>(MaxSrcs)), LiveRangesEnded(0) {}
+Inst::Inst(Cfg *Func, InstKind MyKind, SizeT MyMaxSrcs, Variable *MyDest)
+ : Kind(MyKind), Number(Func->newInstNumber()), Dest(MyDest),
+ MaxSrcs(MyMaxSrcs), Srcs(Func->allocateArrayOf<Operand *>(MyMaxSrcs)),
+ LiveRangesEnded(0) {}
// Assign the instruction a new number.
void Inst::renumber(Cfg *Func) {
@@ -237,17 +238,17 @@ bool Inst::liveness(InstNumberT InstNumber, LivenessBV &Live,
return true;
}
-InstAlloca::InstAlloca(Cfg *Func, Operand *ByteCount, uint32_t AlignInBytes,
+InstAlloca::InstAlloca(Cfg *Func, Operand *ByteCount, uint32_t MyAlignInBytes,
Variable *Dest)
- : InstHighLevel(Func, Inst::Alloca, 1, Dest), AlignInBytes(AlignInBytes) {
+ : InstHighLevel(Func, Inst::Alloca, 1, Dest), AlignInBytes(MyAlignInBytes) {
// Verify AlignInBytes is 0 or a power of 2.
assert(AlignInBytes == 0 || llvm::isPowerOf2_32(AlignInBytes));
addSource(ByteCount);
}
-InstArithmetic::InstArithmetic(Cfg *Func, OpKind Op, Variable *Dest,
+InstArithmetic::InstArithmetic(Cfg *Func, OpKind MyOp, Variable *Dest,
Operand *Source1, Operand *Source2)
- : InstHighLevel(Func, Inst::Arithmetic, 2, Dest), Op(Op) {
+ : InstHighLevel(Func, Inst::Arithmetic, 2, Dest), Op(MyOp) {
addSource(Source1);
addSource(Source2);
}
@@ -271,10 +272,10 @@ InstAssign::InstAssign(Cfg *Func, Variable *Dest, Operand *Source)
// If TargetTrue==TargetFalse, we turn it into an unconditional
// branch. This ensures that, along with the 'switch' instruction
// semantics, there is at most one edge from one node to another.
-InstBr::InstBr(Cfg *Func, Operand *Source, CfgNode *TargetTrue_,
- CfgNode *TargetFalse_)
- : InstHighLevel(Func, Inst::Br, 1, nullptr), TargetFalse(TargetFalse_),
- TargetTrue(TargetTrue_) {
+InstBr::InstBr(Cfg *Func, Operand *Source, CfgNode *MyTargetTrue,
+ CfgNode *MyTargetFalse)
+ : InstHighLevel(Func, Inst::Br, 1, nullptr), TargetFalse(MyTargetFalse),
+ TargetTrue(MyTargetTrue) {
if (TargetTrue == TargetFalse) {
TargetTrue = nullptr; // turn into unconditional version
} else {
@@ -306,8 +307,9 @@ bool InstBr::repointEdge(CfgNode *OldNode, CfgNode *NewNode) {
return false;
}
-InstCast::InstCast(Cfg *Func, OpKind CastKind, Variable *Dest, Operand *Source)
- : InstHighLevel(Func, Inst::Cast, 1, Dest), CastKind(CastKind) {
+InstCast::InstCast(Cfg *Func, OpKind MyCastKind, Variable *Dest,
+ Operand *Source)
+ : InstHighLevel(Func, Inst::Cast, 1, Dest), CastKind(MyCastKind) {
addSource(Source);
}
@@ -318,16 +320,16 @@ InstExtractElement::InstExtractElement(Cfg *Func, Variable *Dest,
addSource(Source2);
}
-InstFcmp::InstFcmp(Cfg *Func, FCond Condition, Variable *Dest, Operand *Source1,
- Operand *Source2)
- : InstHighLevel(Func, Inst::Fcmp, 2, Dest), Condition(Condition) {
+InstFcmp::InstFcmp(Cfg *Func, FCond MyCondition, Variable *Dest,
+ Operand *Source1, Operand *Source2)
+ : InstHighLevel(Func, Inst::Fcmp, 2, Dest), Condition(MyCondition) {
addSource(Source1);
addSource(Source2);
}
-InstIcmp::InstIcmp(Cfg *Func, ICond Condition, Variable *Dest, Operand *Source1,
- Operand *Source2)
- : InstHighLevel(Func, Inst::Icmp, 2, Dest), Condition(Condition) {
+InstIcmp::InstIcmp(Cfg *Func, ICond MyCondition, Variable *Dest,
+ Operand *Source1, Operand *Source2)
+ : InstHighLevel(Func, Inst::Icmp, 2, Dest), Condition(MyCondition) {
addSource(Source1);
addSource(Source2);
}
@@ -434,10 +436,10 @@ void InstStore::setRmwBeacon(Variable *Beacon) {
Srcs[2] = Beacon;
}
-InstSwitch::InstSwitch(Cfg *Func, SizeT NumCases, Operand *Source,
- CfgNode *LabelDefault)
- : InstHighLevel(Func, Inst::Switch, 1, nullptr), LabelDefault(LabelDefault),
- NumCases(NumCases) {
+InstSwitch::InstSwitch(Cfg *Func, SizeT MyNumCases, Operand *Source,
+ CfgNode *MyLabelDefault)
+ : InstHighLevel(Func, Inst::Switch, 1, nullptr),
+ LabelDefault(MyLabelDefault), NumCases(MyNumCases) {
addSource(Source);
Values = Func->allocateArrayOf<uint64_t>(NumCases);
Labels = Func->allocateArrayOf<CfgNode *>(NumCases);
@@ -481,9 +483,9 @@ bool InstSwitch::repointEdge(CfgNode *OldNode, CfgNode *NewNode) {
InstUnreachable::InstUnreachable(Cfg *Func)
: InstHighLevel(Func, Inst::Unreachable, 0, nullptr) {}
-InstBundleLock::InstBundleLock(Cfg *Func, InstBundleLock::Option BundleOption)
+InstBundleLock::InstBundleLock(Cfg *Func, InstBundleLock::Option MyBundleOption)
: InstHighLevel(Func, Inst::BundleLock, 0, nullptr),
- BundleOption(BundleOption) {}
+ BundleOption(MyBundleOption) {}
InstBundleUnlock::InstBundleUnlock(Cfg *Func)
: InstHighLevel(Func, Inst::BundleUnlock, 0, nullptr) {}
@@ -501,8 +503,8 @@ InstFakeUse::InstFakeUse(Cfg *Func, Variable *Src)
addSource(Src);
}
-InstFakeKill::InstFakeKill(Cfg *Func, const Inst *Linked)
- : InstHighLevel(Func, Inst::FakeKill, 0, nullptr), Linked(Linked) {}
+InstFakeKill::InstFakeKill(Cfg *Func, const Inst *MyLinked)
+ : InstHighLevel(Func, Inst::FakeKill, 0, nullptr), Linked(MyLinked) {}
Type InstCall::getReturnType() const {
if (Dest == nullptr)
@@ -520,11 +522,10 @@ void Inst::dumpDecorated(const Cfg *Func) const {
return;
if (Func->isVerbose(IceV_InstNumbers)) {
char buf[30];
- InstNumberT Number = getNumber();
- if (Number == NumberDeleted)
+ if (getNumber() == NumberDeleted)
snprintf(buf, llvm::array_lengthof(buf), "[XXX]");
else
- snprintf(buf, llvm::array_lengthof(buf), "[%3d]", Number);
+ snprintf(buf, llvm::array_lengthof(buf), "[%3d]", getNumber());
Str << buf;
}
Str << " ";
« src/IceInst.h ('K') | « src/IceInst.h ('k') | src/IceInstARM32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698