Skip to content
This repository was archived by the owner on Apr 23, 2020. It is now read-only.

Commit becb208

Browse files
committed
range-for some loops in DAE
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219167 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 9aba189 commit becb208

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

lib/Transforms/IPO/DeadArgumentElimination.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,8 +1093,8 @@ bool DAE::runOnModule(Module &M) {
10931093
// determine that dead arguments passed into recursive functions are dead).
10941094
//
10951095
DEBUG(dbgs() << "DAE - Determining liveness\n");
1096-
for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
1097-
SurveyFunction(*I);
1096+
for (auto &F : M)
1097+
SurveyFunction(F);
10981098

10991099
// Now, remove all dead arguments and return values from each function in
11001100
// turn.
@@ -1107,11 +1107,8 @@ bool DAE::runOnModule(Module &M) {
11071107

11081108
// Finally, look for any unused parameters in functions with non-local
11091109
// linkage and replace the passed in parameters with undef.
1110-
for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) {
1111-
Function& F = *I;
1112-
1110+
for (auto &F : M)
11131111
Changed |= RemoveDeadArgumentsFromCallers(F);
1114-
}
11151112

11161113
return Changed;
11171114
}

0 commit comments

Comments
 (0)