summaryrefslogtreecommitdiff
path: root/include/llvm/Analysis/LoopInfo.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Analysis/LoopInfo.h')
-rw-r--r--include/llvm/Analysis/LoopInfo.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/llvm/Analysis/LoopInfo.h b/include/llvm/Analysis/LoopInfo.h
index 48c59ac4e9..7ebcd6b849 100644
--- a/include/llvm/Analysis/LoopInfo.h
+++ b/include/llvm/Analysis/LoopInfo.h
@@ -134,9 +134,9 @@ public:
block_iterator block_begin() const { return Blocks.begin(); }
block_iterator block_end() const { return Blocks.end(); }
- /// getNumBlocks - Get the number of blocks in this loop.
+ /// getNumBlocks - Get the number of blocks in this loop in constant time.
unsigned getNumBlocks() const {
- return std::distance(block_begin(), block_end());
+ return Blocks.size();
}
/// isLoopExiting - True if terminator in the block can branch to another