aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/llvm12/include/llvm/Support/ReverseIteration.h
blob: 9c68ed13b8b43219ba2f1a3a167221f4d53ce80e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#pragma once 
 
#ifdef __GNUC__ 
#pragma GCC diagnostic push 
#pragma GCC diagnostic ignored "-Wunused-parameter" 
#endif 
 
#ifndef LLVM_SUPPORT_REVERSEITERATION_H 
#define LLVM_SUPPORT_REVERSEITERATION_H 
 
#include "llvm/Config/abi-breaking.h" 
#include "llvm/Support/PointerLikeTypeTraits.h" 
 
namespace llvm { 
 
template<class T = void *> 
bool shouldReverseIterate() { 
#if LLVM_ENABLE_REVERSE_ITERATION 
  return detail::IsPointerLike<T>::value; 
#else 
  return false; 
#endif 
} 
 
} 
#endif 
 
#ifdef __GNUC__ 
#pragma GCC diagnostic pop 
#endif