Revert "[Windows] Simplify assertion code. NFC."
[oota-llvm.git] / lib / Support / IntervalMap.cpp
index 6f39b183a1c8d8eb0b1d463e8c16586ac40ef6a9..e11a7f2eb843ee0e7a507148bf1cdb8c0c1e1578 100644 (file)
@@ -58,7 +58,7 @@ void Path::moveLeft(unsigned Level) {
     }
   } else if (height() < Level)
     // end() may have created a height=0 path.
-    path.resize(Level + 1, Entry(0, 0, 0));
+    path.resize(Level + 1, Entry(nullptr, 0, 0));
 
   // NR is the subtree containing our left sibling.
   --path[l].offset;
@@ -79,11 +79,11 @@ NodeRef Path::getRightSibling(unsigned Level) const {
 
   // Go up the tree until we can go right.
   unsigned l = Level - 1;
-  while (l && atLastBranch(l))
+  while (l && atLastEntry(l))
     --l;
 
   // We can't go right.
-  if (atLastBranch(l))
+  if (atLastEntry(l))
     return NodeRef();
 
   // NR is the subtree containing our right sibling.
@@ -100,7 +100,7 @@ void Path::moveRight(unsigned Level) {
 
   // Go up the tree until we can go right.
   unsigned l = Level - 1;
-  while (l && atLastBranch(l))
+  while (l && atLastEntry(l))
     --l;
 
   // NR is the subtree containing our right sibling. If we hit end(), we have