Switch more loops to be range-based

This makes the code a little more concise, no functional change is
intended.

llvm-svn: 273644
This commit is contained in:
David Majnemer
2016-06-24 04:05:21 +00:00
parent 024402dcdf
commit d770877328
14 changed files with 52 additions and 68 deletions

View File

@@ -1287,8 +1287,7 @@ updateInlinedAtInfo(const DebugLoc &DL, DILocation *InlinedAtNode,
// Starting from the top, rebuild the nodes to point to the new inlined-at
// location (then rebuilding the rest of the chain behind it) and update the
// map of already-constructed inlined-at nodes.
for (const DILocation *MD : make_range(InlinedAtLocations.rbegin(),
InlinedAtLocations.rend())) {
for (const DILocation *MD : reverse(InlinedAtLocations)) {
Last = IANodes[MD] = DILocation::getDistinct(
Ctx, MD->getLine(), MD->getColumn(), MD->getScope(), Last);
}