[wpiutil] Upgrade to LLVM 18.1.1 (#6405)

This commit is contained in:
Tyler Veness
2024-03-17 18:39:03 -07:00
committed by GitHub
parent fd4424eb89
commit b4674bacb9
62 changed files with 964 additions and 664 deletions

View File

@@ -333,9 +333,9 @@ constexpr inline uint64_t NextPowerOf2(uint64_t A) {
/// Returns the power of two which is greater than or equal to the given value.
/// Essentially, it is a ceil operation across the domain of powers of two.
inline uint64_t PowerOf2Ceil(uint64_t A) {
if (!A)
if (!A || A > UINT64_MAX / 2)
return 0;
return NextPowerOf2(A - 1);
return UINT64_C(1) << Log2_64_Ceil(A);
}
/// Returns the next integer (mod 2**64) that is greater than or equal to