diff options
author | Dan Gohman <gohman@apple.com> | 2008-08-14 18:13:49 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-08-14 18:13:49 +0000 |
commit | a8c763b3071ae1a58ee8baeb282331245527e004 (patch) | |
tree | ae6a11d42901b80c9db1408f7dc3850f114b030c /include/llvm | |
parent | c1f1d46f000eacceaa861e5b083ef0424cb9b41a (diff) |
Use empty() instead of begin() == end().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54780 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r-- | include/llvm/Analysis/LoopInfo.h | 2 | ||||
-rw-r--r-- | include/llvm/CodeGen/MachineLoopInfo.h | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/include/llvm/Analysis/LoopInfo.h b/include/llvm/Analysis/LoopInfo.h index e22f22f070..1b684d73d3 100644 --- a/include/llvm/Analysis/LoopInfo.h +++ b/include/llvm/Analysis/LoopInfo.h @@ -648,6 +648,7 @@ public: typedef typename std::vector<LoopBase<BlockT>*>::const_iterator iterator; iterator begin() const { return TopLevelLoops.begin(); } iterator end() const { return TopLevelLoops.end(); } + bool empty() const { return TopLevelLoops.empty(); } /// getLoopFor - Return the inner most loop that BB lives in. If a basic /// block is in no loop (for example the entry node), null is returned. @@ -947,6 +948,7 @@ public: typedef std::vector<Loop*>::const_iterator iterator; inline iterator begin() const { return LI->begin(); } inline iterator end() const { return LI->end(); } + bool empty() const { return LI->empty(); } /// getLoopFor - Return the inner most loop that BB lives in. If a basic /// block is in no loop (for example the entry node), null is returned. diff --git a/include/llvm/CodeGen/MachineLoopInfo.h b/include/llvm/CodeGen/MachineLoopInfo.h index 8b46825f25..fa2d2290e3 100644 --- a/include/llvm/CodeGen/MachineLoopInfo.h +++ b/include/llvm/CodeGen/MachineLoopInfo.h @@ -92,6 +92,7 @@ public: typedef std::vector<MachineLoop*>::const_iterator iterator; inline iterator begin() const { return LI->begin(); } inline iterator end() const { return LI->end(); } + bool empty() const { return LI->empty(); } /// getLoopFor - Return the inner most loop that BB lives in. If a basic /// block is in no loop (for example the entry node), null is returned. |