forked from OSchip/llvm-project
Revert "Make rehash(0) work with ubsan's unsigned-integer-overflow."
Seems to have broken some tests since I first wrote this a while back. Will reland after checking what went wrong with the tests. This reverts commit 7023194c8d11a081fd01ed25308b3d60193c6a06. llvm-svn: 322039
This commit is contained in:
parent
de91dff5d4
commit
553b09b515
|
@ -2136,7 +2136,7 @@ template <class _Tp, class _Hash, class _Equal, class _Alloc>
|
|||
void
|
||||
__hash_table<_Tp, _Hash, _Equal, _Alloc>::rehash(size_type __n)
|
||||
{
|
||||
if (__n < 2)
|
||||
if (__n == 1)
|
||||
__n = 2;
|
||||
else if (__n & (__n - 1))
|
||||
__n = __next_prime(__n);
|
||||
|
|
Loading…
Reference in New Issue