diff --git a/lib/Target/PowerPC/PPCBoolRetToInt.cpp b/lib/Target/PowerPC/PPCBoolRetToInt.cpp index 7920240bc2b..9ca389fde00 100644 --- a/lib/Target/PowerPC/PPCBoolRetToInt.cpp +++ b/lib/Target/PowerPC/PPCBoolRetToInt.cpp @@ -119,7 +119,7 @@ class PPCBoolRetToInt : public FunctionPass { Promotable.insert(P); SmallVector ToRemove; - for (const auto &P : Promotable) { + for (const PHINode *P : Promotable) { // Condition 2 and 3 auto IsValidUser = [] (const Value *V) -> bool { return isa(V) || isa(V) || isa(V) || @@ -146,7 +146,7 @@ class PPCBoolRetToInt : public FunctionPass { Promotable.erase(User); ToRemove.clear(); - for (const auto &P : Promotable) { + for (const PHINode *P : Promotable) { // Condition 4 and 5 const auto &Users = P->users(); const auto &Operands = P->operands(); @@ -199,11 +199,11 @@ class PPCBoolRetToInt : public FunctionPass { // Presently, we only know how to handle PHINode, Constant, and Arguments. // Potentially, bitwise operations (AND, OR, XOR, NOT) and sign extension // could also be handled in the future. - for (const auto &V : Defs) + for (Value *V : Defs) if (!isa(V) && !isa(V) && !isa(V)) return false; - for (const auto &V : Defs) + for (Value *V : Defs) if (const PHINode *P = dyn_cast(V)) if (!PromotablePHINodes.count(P)) return false; @@ -214,7 +214,7 @@ class PPCBoolRetToInt : public FunctionPass { ++NumBoolCallPromotion; ++NumBoolToIntPromotion; - for (const auto &V : Defs) + for (Value *V : Defs) if (!BoolToIntMap.count(V)) BoolToIntMap[V] = translate(V); diff --git a/lib/Transforms/Utils/MemorySSA.cpp b/lib/Transforms/Utils/MemorySSA.cpp index b162567c69b..5fa5bafb6df 100644 --- a/lib/Transforms/Utils/MemorySSA.cpp +++ b/lib/Transforms/Utils/MemorySSA.cpp @@ -473,7 +473,7 @@ void MemorySSA::verifyDomination(Function &F) const { if (!MD) continue; - for (const auto &U : MD->users()) { + for (User *U : MD->users()) { BasicBlock *UseBlock; // Things are allowed to flow to phi nodes over their predecessor edge. if (auto *P = dyn_cast(U)) { diff --git a/tools/sancov/sancov.cc b/tools/sancov/sancov.cc index 42bdfd40f03..7aa2e051b14 100644 --- a/tools/sancov/sancov.cc +++ b/tools/sancov/sancov.cc @@ -364,7 +364,7 @@ static void getObjectCoveragePoints(const object::ObjectFile &O, if (SanCovAddrs.empty()) Fail("__sanitizer_cov* functions not found"); - for (const auto Section : O.sections()) { + for (object::SectionRef Section : O.sections()) { if (Section.isVirtual() || !Section.isText()) // llvm-objdump does the same. continue; uint64_t SectionAddr = Section.getAddress();