aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/ADT/IntervalMap.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/ADT/IntervalMap.h')
-rw-r--r--include/llvm/ADT/IntervalMap.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/ADT/IntervalMap.h b/include/llvm/ADT/IntervalMap.h
index b128f31a8d..dd4eec3c63 100644
--- a/include/llvm/ADT/IntervalMap.h
+++ b/include/llvm/ADT/IntervalMap.h
@@ -1235,7 +1235,7 @@ public:
if (!branched()) {
assert(rootOffset && "Cannot decrement begin()");
--rootOffset;
- } else if (treeLeafOffset())
+ } else if (valid() && treeLeafOffset())
--treeLeafOffset();
else
treeDecrement();