diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2010-02-16 09:30:23 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2010-02-16 09:30:23 +0000 |
commit | f25ddd991a5601d0101602c4c263a58c7af4b8a2 (patch) | |
tree | 4cfca640904d1896e25032757a61f8959c066919 /include/llvm/ADT/ImmutableSet.h | |
parent | 3fd58f91dd318518f7daa4ba64c0aaf31799d89b (diff) | |
download | FreeBSD-src-f25ddd991a5601d0101602c4c263a58c7af4b8a2.zip FreeBSD-src-f25ddd991a5601d0101602c4c263a58c7af4b8a2.tar.gz |
Update LLVM to r96341.
Diffstat (limited to 'include/llvm/ADT/ImmutableSet.h')
-rw-r--r-- | include/llvm/ADT/ImmutableSet.h | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/include/llvm/ADT/ImmutableSet.h b/include/llvm/ADT/ImmutableSet.h index ac06a40..65e70e2 100644 --- a/include/llvm/ADT/ImmutableSet.h +++ b/include/llvm/ADT/ImmutableSet.h @@ -27,6 +27,7 @@ namespace llvm { //===----------------------------------------------------------------------===// template <typename ImutInfo> class ImutAVLFactory; +template <typename ImutInfo> class ImutIntervalAVLFactory; template <typename ImutInfo> class ImutAVLTreeInOrderIterator; template <typename ImutInfo> class ImutAVLTreeGenericIterator; @@ -39,6 +40,7 @@ public: typedef ImutAVLFactory<ImutInfo> Factory; friend class ImutAVLFactory<ImutInfo>; + friend class ImutIntervalAVLFactory<ImutInfo>; friend class ImutAVLTreeGenericIterator<ImutInfo>; friend class FoldingSet<ImutAVLTree>; @@ -389,7 +391,7 @@ public: // These have succinct names so that the balancing code // is as terse (and readable) as possible. //===--------------------------------------------------===// -private: +protected: bool isEmpty(TreeTy* T) const { return !T; } unsigned Height(TreeTy* T) const { return T ? T->getHeight() : 0; } @@ -581,25 +583,14 @@ public: continue; // We found a collision. Perform a comparison of Contents('T') - // with Contents('L')+'V'+Contents('R'). + // with Contents('TNew') typename TreeTy::iterator TI = T->begin(), TE = T->end(); - // First compare Contents('L') with the (initial) contents of T. - if (!CompareTreeWithSection(TNew->getLeft(), TI, TE)) - continue; - - // Now compare the new data element. - if (TI == TE || !TI->ElementEqual(TNew->getValue())) - continue; - - ++TI; - - // Now compare the remainder of 'T' with 'R'. - if (!CompareTreeWithSection(TNew->getRight(), TI, TE)) + if (!CompareTreeWithSection(TNew, TI, TE)) continue; if (TI != TE) - continue; // Contents('R') did not match suffix of 'T'. + continue; // T has more contents than TNew. // Trees did match! Return 'T'. return T; |