[llvm] r257646 - rangify; NFCI
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 13 10:37:28 PST 2016
Author: spatel
Date: Wed Jan 13 12:37:28 2016
New Revision: 257646
URL: http://llvm.org/viewvc/llvm-project?rev=257646&view=rev
Log:
rangify; NFCI
Modified:
llvm/trunk/lib/Analysis/ScopedNoAliasAA.cpp
Modified: llvm/trunk/lib/Analysis/ScopedNoAliasAA.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScopedNoAliasAA.cpp?rev=257646&r1=257645&r2=257646&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ScopedNoAliasAA.cpp (original)
+++ llvm/trunk/lib/Analysis/ScopedNoAliasAA.cpp Wed Jan 13 12:37:28 2016
@@ -131,8 +131,8 @@ ModRefInfo ScopedNoAliasAAResult::getMod
void ScopedNoAliasAAResult::collectMDInDomain(
const MDNode *List, const MDNode *Domain,
SmallPtrSetImpl<const MDNode *> &Nodes) const {
- for (unsigned i = 0, ie = List->getNumOperands(); i != ie; ++i)
- if (const MDNode *MD = dyn_cast<MDNode>(List->getOperand(i)))
+ for (const MDOperand &MDOp : List->operands())
+ if (const MDNode *MD = dyn_cast<MDNode>(MDOp))
if (AliasScopeNode(MD).getDomain() == Domain)
Nodes.insert(MD);
}
@@ -144,8 +144,8 @@ bool ScopedNoAliasAAResult::mayAliasInSc
// Collect the set of scope domains relevant to the noalias scopes.
SmallPtrSet<const MDNode *, 16> Domains;
- for (unsigned i = 0, ie = NoAlias->getNumOperands(); i != ie; ++i)
- if (const MDNode *NAMD = dyn_cast<MDNode>(NoAlias->getOperand(i)))
+ for (const MDOperand &MDOp : NoAlias->operands())
+ if (const MDNode *NAMD = dyn_cast<MDNode>(MDOp))
if (const MDNode *Domain = AliasScopeNode(NAMD).getDomain())
Domains.insert(Domain);
More information about the llvm-commits
mailing list