aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/InlineFunction.cpp
diff options
context:
space:
mode:
authorPete Cooper <peter_cooper@apple.com>2015-07-24 21:13:43 +0000
committerPete Cooper <peter_cooper@apple.com>2015-07-24 21:13:43 +0000
commit7679afda82bb2401fe12f1a5d6c55876cfa8d04c (patch)
tree311a323dd1780c8e315e8da55eb90ff046efada2 /llvm/lib/Transforms/Utils/InlineFunction.cpp
parent16bc6e172700bc61c979d37427f5f8a308ea6166 (diff)
downloadllvm-7679afda82bb2401fe12f1a5d6c55876cfa8d04c.zip
llvm-7679afda82bb2401fe12f1a5d6c55876cfa8d04c.tar.gz
llvm-7679afda82bb2401fe12f1a5d6c55876cfa8d04c.tar.bz2
Use make_range(rbegin(), rend()) to allow foreach loops. NFC.
Instead of the pattern for (auto I = x.rbegin(), E = x.end(); I != E; ++I) we can use make_range to construct the reverse range and iterate using that instead. llvm-svn: 243163
Diffstat (limited to 'llvm/lib/Transforms/Utils/InlineFunction.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/InlineFunction.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Utils/InlineFunction.cpp b/llvm/lib/Transforms/Utils/InlineFunction.cpp
index bc6e9bf..c970a2d 100644
--- a/llvm/lib/Transforms/Utils/InlineFunction.cpp
+++ b/llvm/lib/Transforms/Utils/InlineFunction.cpp
@@ -851,9 +851,8 @@ updateInlinedAtInfo(DebugLoc DL, DILocation *InlinedAtNode, LLVMContext &Ctx,
// 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 (auto I = InlinedAtLocations.rbegin(), E = InlinedAtLocations.rend();
- I != E; ++I) {
- const DILocation *MD = *I;
+ for (const DILocation *MD : make_range(InlinedAtLocations.rbegin(),
+ InlinedAtLocations.rend())) {
Last = IANodes[MD] = DILocation::getDistinct(
Ctx, MD->getLine(), MD->getColumn(), MD->getScope(), Last);
}