mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 12:12:47 +01:00
[ModuleUtils] Use range-based loop. NFC.
llvm-svn: 264122
This commit is contained in:
parent
688f698b59
commit
e4c2b4a07d
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user