X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FADT%2FImmutableMap.h;h=52708bc8a10873ae2e11f9c08b5b60d46f5afc67;hb=b141e397d52d9946e93f84c65c6b2e653b026041;hp=07cdb56a9ab0c08de4c5a27b6ac548f6c92ed4c4;hpb=a2769a33c94f021a609a462b28ebea069eba6f74;p=oota-llvm.git diff --git a/include/llvm/ADT/ImmutableMap.h b/include/llvm/ADT/ImmutableMap.h index 07cdb56a9ab..52708bc8a10 100644 --- a/include/llvm/ADT/ImmutableMap.h +++ b/include/llvm/ADT/ImmutableMap.h @@ -202,6 +202,13 @@ public: return 0; } + + /// getMaxElement - Returns the pair in the ImmutableMap for + /// which key is the highest in the ordering of keys in the map. This + /// method returns NULL if the map is empty. + value_type* getMaxElement() const { + return Root ? &(Root->getMaxElement()->getValue()) : 0; + } //===--------------------------------------------------===// // Utility methods.