1
0
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:
Ted Kremenek 2008-01-21 22:54:46 +00:00
parent bee8cd7cd8
commit 8425e78e77

View File

@ -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