Define an operator<< for APInt to be used with std::ostream.
[oota-llvm.git] / include / llvm / ADT / ImmutableSet.h
index ba1262b077c31f1724ebf8a6fa79a207609bdef1..be274dbe6758ce18fbdfb540c187996fee0536df 100644 (file)
@@ -86,6 +86,15 @@ public:
 
     return NULL;
   }
+  
+  /// getMaxElement - Find the subtree associated with the highest ranged
+  ///  key value.
+  ImutAVLTree* getMaxElement() {
+    ImutAVLTree *T = this;
+    ImutAVLTree *Right = T->getRight();    
+    while (Right) { T = Right; Right = T->getRight(); }
+    return T;
+  }
 
   /// size - Returns the number of nodes in the tree, which includes
   ///  both leaves and non-leaf nodes.