summaryrefslogtreecommitdiff
path: root/include/llvm/Analysis/LoopInfoImpl.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Analysis/LoopInfoImpl.h')
-rw-r--r--include/llvm/Analysis/LoopInfoImpl.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/llvm/Analysis/LoopInfoImpl.h b/include/llvm/Analysis/LoopInfoImpl.h
index 6dc0422ce0e9..66c9f68afc60 100644
--- a/include/llvm/Analysis/LoopInfoImpl.h
+++ b/include/llvm/Analysis/LoopInfoImpl.h
@@ -35,7 +35,7 @@ template<class BlockT, class LoopT>
void LoopBase<BlockT, LoopT>::
getExitingBlocks(SmallVectorImpl<BlockT *> &ExitingBlocks) const {
for (const auto BB : blocks())
- for (const auto Succ : children<BlockT*>(BB))
+ for (const auto &Succ : children<BlockT*>(BB))
if (!contains(Succ)) {
// Not in current loop? It must be an exit block.
ExitingBlocks.push_back(BB);
@@ -61,7 +61,7 @@ template<class BlockT, class LoopT>
void LoopBase<BlockT, LoopT>::
getExitBlocks(SmallVectorImpl<BlockT*> &ExitBlocks) const {
for (const auto BB : blocks())
- for (const auto Succ : children<BlockT*>(BB))
+ for (const auto &Succ : children<BlockT*>(BB))
if (!contains(Succ))
// Not in current loop? It must be an exit block.
ExitBlocks.push_back(Succ);
@@ -83,7 +83,7 @@ template<class BlockT, class LoopT>
void LoopBase<BlockT, LoopT>::
getExitEdges(SmallVectorImpl<Edge> &ExitEdges) const {
for (const auto BB : blocks())
- for (const auto Succ : children<BlockT*>(BB))
+ for (const auto &Succ : children<BlockT*>(BB))
if (!contains(Succ))
// Not in current loop? It must be an exit block.
ExitEdges.emplace_back(BB, Succ);