LLVM 20.0.0git
Classes | Public Types | Static Public Member Functions | Static Public Attributes | List of all members
llvm::detail::PointerSumTypeHelper< TagT, MemberTs > Struct Template Reference

A helper template for implementing PointerSumType. More...

#include "llvm/ADT/PointerSumType.h"

Inheritance diagram for llvm::detail::PointerSumTypeHelper< TagT, MemberTs >:
Inheritance graph
[legend]

Classes

struct  Checker
 
struct  Checker< MemberT >
 
struct  Lookup
 
struct  Min
 
struct  Min< V >
 

Public Types

enum  { NumTagBits = Min<MemberTs::TraitsT::NumLowBitsAvailable...>::value }
 
enum  : uint64_t { PointerMask = static_cast<uint64_t>(-1) << NumTagBits , TagMask = ~PointerMask }
 

Static Public Member Functions

template<TagT N, typename PointerT , typename TraitsT >
static PointerSumTypeMember< N, PointerT, TraitsTLookupOverload (PointerSumTypeMember< N, PointerT, TraitsT > *)
 
template<TagT N>
static void LookupOverload (...)
 

Static Public Attributes

static constexpr TagT MinTag
 

Detailed Description

template<typename TagT, typename... MemberTs>
struct llvm::detail::PointerSumTypeHelper< TagT, MemberTs >

A helper template for implementing PointerSumType.

It provides fast compile-time lookup of the member from a particular tag value, along with useful constants and compile time checking infrastructure..

Definition at line 206 of file PointerSumType.h.

Member Enumeration Documentation

◆ anonymous enum

template<typename TagT , typename... MemberTs>
anonymous enum
Enumerator
NumTagBits 

Definition at line 237 of file PointerSumType.h.

◆ anonymous enum

template<typename TagT , typename... MemberTs>
anonymous enum : uint64_t
Enumerator
PointerMask 
TagMask 

Definition at line 242 of file PointerSumType.h.

Member Function Documentation

◆ LookupOverload() [1/2]

template<typename TagT , typename... MemberTs>
template<TagT N>
static void llvm::detail::PointerSumTypeHelper< TagT, MemberTs >::LookupOverload (   ...)
static

◆ LookupOverload() [2/2]

template<typename TagT , typename... MemberTs>
template<TagT N, typename PointerT , typename TraitsT >
static PointerSumTypeMember< N, PointerT, TraitsT > llvm::detail::PointerSumTypeHelper< TagT, MemberTs >::LookupOverload ( PointerSumTypeMember< N, PointerT, TraitsT > *  )
static

Member Data Documentation

◆ MinTag

template<typename TagT , typename... MemberTs>
constexpr TagT llvm::detail::PointerSumTypeHelper< TagT, MemberTs >::MinTag
staticconstexpr
Initial value:
=
static_cast<TagT>(Min<MemberTs::Tag...>::value)
Given that RA is a live value

Definition at line 240 of file PointerSumType.h.

Referenced by llvm::PointerSumType< TagT, MemberTs >::getAddrOfZeroTagPointer().


The documentation for this struct was generated from the following file: