[llvm] [ADT] Fix non-assertion build after 36c812f771 (PR #210511)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 18 06:46:24 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-adt
Author: Krzysztof Parzyszek (kparzysz)
<details>
<summary>Changes</summary>
https://lab.llvm.org/buildbot/#/builders/228/builds/5253
---
Full diff: https://github.com/llvm/llvm-project/pull/210511.diff
1 Files Affected:
- (modified) llvm/include/llvm/ADT/Sequence.h (+6-1)
``````````diff
diff --git a/llvm/include/llvm/ADT/Sequence.h b/llvm/include/llvm/ADT/Sequence.h
index b79c794526a8e..6aea8d9e29a91 100644
--- a/llvm/include/llvm/ADT/Sequence.h
+++ b/llvm/include/llvm/ADT/Sequence.h
@@ -87,6 +87,7 @@
// std::enable_if
#include "llvm/ADT/STLForwardCompat.h" // llvm::to_underlying
+#include "llvm/Support/Error.h" // llvm_unreachable
#include "llvm/Support/MathExtras.h" // AddOverflow / SubOverflow
namespace llvm {
@@ -185,9 +186,13 @@ struct CheckedInt {
}
private:
+#ifndef NDEBUG
[[noreturn]] static void assertOutOfBounds() {
- assert(false && "Out of bounds");
+ llvm_unreachable("Out of bounds");
}
+#else
+ static constexpr void assertOutOfBounds() {}
+#endif
intmax_t Value = 0;
};
``````````
</details>
https://github.com/llvm/llvm-project/pull/210511
More information about the llvm-commits
mailing list