summaryrefslogtreecommitdiff
path: root/src/hash.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/hash.cpp')
-rw-r--r--src/hash.cpp19
1 files changed, 5 insertions, 14 deletions
diff --git a/src/hash.cpp b/src/hash.cpp
index dc90f789c6b8..89bb736c86c2 100644
--- a/src/hash.cpp
+++ b/src/hash.cpp
@@ -1,9 +1,8 @@
//===-------------------------- hash.cpp ----------------------------------===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is dual licensed under the MIT and the University of Illinois Open
-// Source Licenses. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -154,12 +153,8 @@ inline _LIBCPP_INLINE_VISIBILITY
typename enable_if<_Sz == 4, void>::type
__check_for_overflow(size_t N)
{
-#ifndef _LIBCPP_NO_EXCEPTIONS
if (N > 0xFFFFFFFB)
- throw overflow_error("__next_prime overflow");
-#else
- (void)N;
-#endif
+ __throw_overflow_error("__next_prime overflow");
}
template <size_t _Sz = sizeof(size_t)>
@@ -167,12 +162,8 @@ inline _LIBCPP_INLINE_VISIBILITY
typename enable_if<_Sz == 8, void>::type
__check_for_overflow(size_t N)
{
-#ifndef _LIBCPP_NO_EXCEPTIONS
if (N > 0xFFFFFFFFFFFFFFC5ull)
- throw overflow_error("__next_prime overflow");
-#else
- (void)N;
-#endif
+ __throw_overflow_error("__next_prime overflow");
}
size_t