forked from OSchip/llvm-project
Fixed buggy caching of the hash value of an ImutAVLTree node.
llvm-svn: 46229
This commit is contained in:
parent
5465d11a23
commit
a7287785ad
|
@ -231,9 +231,12 @@ private:
|
|||
}
|
||||
|
||||
inline unsigned ComputeHash() {
|
||||
if (!isMutable() && Hash) return Hash;
|
||||
Hash = ComputeHash(getSafeLeft(), getRight(), getValue());
|
||||
return Hash;
|
||||
if (Hash) return Hash;
|
||||
|
||||
unsigned X = ComputeHash(getSafeLeft(), getRight(), getValue());
|
||||
if (!isMutable()) Hash = X;
|
||||
|
||||
return X;
|
||||
}
|
||||
|
||||
/// Profile - Generates a FoldingSet profile for a tree node before it is
|
||||
|
|
Loading…
Reference in New Issue