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

Unified Diff: src/IceTargetLoweringX86BaseImpl.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/IceTargetLoweringX86BaseImpl.h
diff --git a/src/IceTargetLoweringX86BaseImpl.h b/src/IceTargetLoweringX86BaseImpl.h
index a2bf75f6885b065de8b756ec2f9f470425c2201c..4c843bf96ea988e8091a06fa51855c8543bd8ebd 100644
--- a/src/IceTargetLoweringX86BaseImpl.h
+++ b/src/IceTargetLoweringX86BaseImpl.h
@@ -29,7 +29,12 @@
#include "IceTargetLoweringX8632.def"
#include "IceTargetLoweringX8632.h"
#include "IceUtils.h"
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunused-parameter"
+#pragma clang diagnostic ignored "-Wshadow"
#include "llvm/Support/MathExtras.h"
+#pragma clang diagnostic pop
namespace Ice {
namespace X86Internal {
@@ -198,10 +203,10 @@ void BoolFolding<MachineTraits>::init(CfgNode *Node) {
Operand *Src = Instr.getSrc(I);
SizeT NumVars = Src->getNumVars();
for (SizeT J = 0; J < NumVars; ++J) {
- const Variable *Var = Src->getVar(J);
- SizeT VarNum = Var->getIndex();
+ const Variable *V = Src->getVar(J);
+ SizeT VarNum = V->getIndex();
if (containsValid(VarNum)) {
- if (I != 0 // All valid consumers use Var as the first source operand
+ if (I != 0 // All valid consumers use V as the first source operand
|| getConsumerKind(&Instr) == CK_None // must be white-listed
|| (Producers[VarNum].IsComplex && // complex can't be multi-use
Producers[VarNum].NumUses > 0)) {
@@ -209,7 +214,7 @@ void BoolFolding<MachineTraits>::init(CfgNode *Node) {
continue;
}
++Producers[VarNum].NumUses;
- if (Instr.isLastUse(Var)) {
+ if (Instr.isLastUse(V)) {
Producers[VarNum].IsLiveOut = false;
}
}
@@ -4730,9 +4735,9 @@ template <class Machine> void TargetX86Base<Machine>::prelowerPhis() {
Variable *DestHi = llvm::cast<Variable>(hiOperand(Dest));
InstPhi *PhiLo = InstPhi::create(Func, Phi->getSrcSize(), DestLo);
InstPhi *PhiHi = InstPhi::create(Func, Phi->getSrcSize(), DestHi);
- for (SizeT I = 0; I < Phi->getSrcSize(); ++I) {
- Operand *Src = Phi->getSrc(I);
- CfgNode *Label = Phi->getLabel(I);
+ for (SizeT i = 0; i < Phi->getSrcSize(); ++i) {
+ Operand *Src = Phi->getSrc(i);
+ CfgNode *Label = Phi->getLabel(i);
if (llvm::isa<ConstantUndef>(Src))
Src = Ctx->getConstantZero(Dest->getType());
PhiLo->addArgument(loOperand(Src), Label);
« src/IceInstARM32.h ('K') | « src/IceTargetLoweringMIPS32.cpp ('k') | src/IceThreading.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698