Changed profiling method for ImmutableMap to once again just use its

unique ImutAVLTree* for profiling.

Modified ImutAVLTree:
 (1) changed ComputeHash() to ComputeDigest() and
 (2) changed Profile() to use the computed digest and
 (3) modified insertion of IMutAVLTree into the FoldingSet owned by
     the ImutAVLTreeFactory object to use profiling instead of computing
     a direct hash.  This fixes a bug where our abuse of the FoldingSet would
     not work when the FoldingSet was resized.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46753 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Ted Kremenek
2008-02-05 17:30:43 +00:00
parent 5a804e3e21
commit 95da16e288
2 changed files with 29 additions and 26 deletions

View File

@@ -206,7 +206,7 @@ public:
inline unsigned getHeight() const { return Root ? Root->getHeight() : 0; }
static inline void Profile(FoldingSetNodeID& ID, const ImmutableMap& M) {
M.Root->Profile(ID);
ID.AddPointer(M.Root);
}
inline void Profile(FoldingSetNodeID& ID) const {