Skip to content

Commit 3285251

Browse files
[Support] Make shouldReverseIterate constexpr (#156812)
This patch makes shouldReverseIterate constexpr, allowing compile-time evaluation at call sites.
1 parent e6aefbe commit 3285251

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/include/llvm/Support/ReverseIteration.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66

77
namespace llvm {
88

9-
template<class T = void *>
10-
bool shouldReverseIterate() {
9+
template <class T = void *> constexpr bool shouldReverseIterate() {
1110
#if LLVM_ENABLE_REVERSE_ITERATION
1211
return detail::IsPointerLike<T>::value;
1312
#else

0 commit comments

Comments
 (0)