aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Analysis/LoopInfo.h2
-rw-r--r--include/llvm/CodeGen/MachineLoopInfo.h1
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.