Skip to content

Commit

Permalink
[ADT] Remove PointerUnionTypeSelector (NFC)
Browse files Browse the repository at this point in the history
The last use was removed on May 17, 2019 in commit
9b92875.
  • Loading branch information
kazutakahirata committed Aug 2, 2021
1 parent 1f04d8e commit d4a3ad7
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions llvm/include/llvm/ADT/PointerUnion.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,36 +23,6 @@

namespace llvm {

template <typename T> struct PointerUnionTypeSelectorReturn {
using Return = T;
};

/// Get a type based on whether two types are the same or not.
///
/// For:
///
/// \code
/// using Ret = typename PointerUnionTypeSelector<T1, T2, EQ, NE>::Return;
/// \endcode
///
/// Ret will be EQ type if T1 is same as T2 or NE type otherwise.
template <typename T1, typename T2, typename RET_EQ, typename RET_NE>
struct PointerUnionTypeSelector {
using Return = typename PointerUnionTypeSelectorReturn<RET_NE>::Return;
};

template <typename T, typename RET_EQ, typename RET_NE>
struct PointerUnionTypeSelector<T, T, RET_EQ, RET_NE> {
using Return = typename PointerUnionTypeSelectorReturn<RET_EQ>::Return;
};

template <typename T1, typename T2, typename RET_EQ, typename RET_NE>
struct PointerUnionTypeSelectorReturn<
PointerUnionTypeSelector<T1, T2, RET_EQ, RET_NE>> {
using Return =
typename PointerUnionTypeSelector<T1, T2, RET_EQ, RET_NE>::Return;
};

namespace pointer_union_detail {
/// Determine the number of bits required to store integers with values < n.
/// This is ceil(log2(n)).
Expand Down

0 comments on commit d4a3ad7

Please sign in to comment.