Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions llvm/include/llvm/ADT/PointerUnion.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@ namespace pointer_union_detail {
return std::min<int>({PointerLikeTypeTraits<Ts>::NumLowBitsAvailable...});
}

/// Find the first type in a list of types.
template <typename T, typename...> struct GetFirstType {
using type = T;
};

/// Provide PointerLikeTypeTraits for void* that is used by PointerUnion
/// for the template arguments.
template <typename ...PTs> class PointerUnionUIntTraits {
Expand Down Expand Up @@ -264,8 +259,7 @@ struct PointerLikeTypeTraits<PointerUnion<PTs...>> {
// Teach DenseMap how to use PointerUnions as keys.
template <typename ...PTs> struct DenseMapInfo<PointerUnion<PTs...>> {
using Union = PointerUnion<PTs...>;
using FirstInfo =
DenseMapInfo<typename pointer_union_detail::GetFirstType<PTs...>::type>;
using FirstInfo = DenseMapInfo<TypeAtIndex<0, PTs...>>;

static inline Union getEmptyKey() { return Union(FirstInfo::getEmptyKey()); }

Expand Down