diff options
Diffstat (limited to 'include/llvm/Support/ReverseIteration.h')
-rw-r--r-- | include/llvm/Support/ReverseIteration.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/include/llvm/Support/ReverseIteration.h b/include/llvm/Support/ReverseIteration.h index cb97b60f06dd9..5e0238d81c4c6 100644 --- a/include/llvm/Support/ReverseIteration.h +++ b/include/llvm/Support/ReverseIteration.h @@ -2,16 +2,18 @@ #define LLVM_SUPPORT_REVERSEITERATION_H #include "llvm/Config/abi-breaking.h" +#include "llvm/Support/PointerLikeTypeTraits.h" namespace llvm { -#if LLVM_ENABLE_ABI_BREAKING_CHECKS -template <class T = void> struct ReverseIterate { static bool value; }; + +template<class T = void *> +bool shouldReverseIterate() { #if LLVM_ENABLE_REVERSE_ITERATION -template <class T> bool ReverseIterate<T>::value = true; + return detail::IsPointerLike<T>::value; #else -template <class T> bool ReverseIterate<T>::value = false; -#endif + return false; #endif } +} #endif |