mirror of
https://github.com/RPCS3/llvm.git
synced 2025-04-12 11:03:24 +00:00
[ModuleUtils] Use range-based loop. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264122 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1495b908cb
commit
11e71d65b2
@ -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…
x
Reference in New Issue
Block a user