[ModuleUtils] Use range-based loop. NFC.

llvm-svn: 264122
This commit is contained in:
Davide Italiano 2016-03-23 00:43:35 +00:00
parent c28b49550a
commit 1a911e204d
1 changed files with 1 additions and 2 deletions

View File

@ -99,8 +99,7 @@ llvm::collectUsedGlobalVariables(Module &M, SmallPtrSetImpl<GlobalValue *> &Set,
return GV;
const ConstantArray *Init = cast<ConstantArray>(GV->getInitializer());
for (unsigned I = 0, E = Init->getNumOperands(); I != E; ++I) {
Value *Op = Init->getOperand(I);
for (Value *Op : Init->operands()) {
GlobalValue *G = cast<GlobalValue>(Op->stripPointerCastsNoFollowAliases());
Set.insert(G);
}