mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 19:52:54 +01:00
Fixed buggy caching of the hash value of an ImutAVLTree node.
llvm-svn: 46229
This commit is contained in:
parent
bee8cd7cd8
commit
8425e78e77
@ -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
Block a user