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/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: 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/IceTargetLoweringX86BaseImpl.h
diff --git a/src/IceTargetLoweringX86BaseImpl.h b/src/IceTargetLoweringX86BaseImpl.h
index a277db23adc70e92847a998e9dd6ac8e9e1a6454..47fcf2755c807dd7a4af019ca245c049cd8abce2 100644
--- a/src/IceTargetLoweringX86BaseImpl.h
+++ b/src/IceTargetLoweringX86BaseImpl.h
@@ -26,7 +26,12 @@
#include "IceLiveness.h"
#include "IceOperand.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 {
@@ -193,10 +198,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)) {
@@ -204,7 +209,7 @@ void BoolFolding<MachineTraits>::init(CfgNode *Node) {
continue;
}
++Producers[VarNum].NumUses;
- if (Instr.isLastUse(Var)) {
+ if (Instr.isLastUse(V)) {
Producers[VarNum].IsLiveOut = false;
}
}
@@ -4705,9 +4710,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/IceInst.h ('K') | « src/IceTargetLoweringX8632Traits.h ('k') | src/IceThreading.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698