From 8ee8cd29878bfb99e7adf32d207521f3b7e65979 Mon Sep 17 00:00:00 2001 From: Jakob Stoklund Olesen Date: Fri, 19 Aug 2011 22:04:19 +0000 Subject: [PATCH] Add IntervalMap::const_iterator::atBegin(). It returns true when operator--() can be called. llvm-svn: 138107 --- llvm/include/llvm/ADT/IntervalMap.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/llvm/include/llvm/ADT/IntervalMap.h b/llvm/include/llvm/ADT/IntervalMap.h index f28ebf3b9a5f..1230e8f5fb43 100644 --- a/llvm/include/llvm/ADT/IntervalMap.h +++ b/llvm/include/llvm/ADT/IntervalMap.h @@ -1335,6 +1335,9 @@ public: /// valid - Return true if the current position is valid, false for end(). bool valid() const { return path.valid(); } + /// atBegin - Return true if the current position is the first map entry. + bool atBegin() const { return path.atBegin(); } + /// start - Return the beginning of the current interval. const KeyT &start() const { return unsafeStart(); }