LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | List of all members
llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits > Class Template Reference

#include <PointerIntPair.h>

Inheritance diagram for llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits >:
Inheritance graph
[legend]

Public Member Functions

 PointerIntPair ()
 
 PointerIntPair (PointerTy PtrVal, IntType IntVal)
 
 PointerIntPair (PointerTy PtrVal)
 
PointerTy getPointer () const
 
IntType getInt () const
 
void setPointer (PointerTy PtrVal)
 
void setInt (IntType IntVal)
 
void initWithPointer (PointerTy PtrVal)
 
void setPointerAndInt (PointerTy PtrVal, IntType IntVal)
 
PointerTy const * getAddrOfPointer () const
 
PointerTygetAddrOfPointer ()
 
void * getOpaqueValue () const
 
void setFromOpaqueValue (void *Val)
 
bool operator== (const PointerIntPair &RHS) const
 
bool operator!= (const PointerIntPair &RHS) const
 
bool operator< (const PointerIntPair &RHS) const
 
bool operator> (const PointerIntPair &RHS) const
 
bool operator<= (const PointerIntPair &RHS) const
 
bool operator>= (const PointerIntPair &RHS) const
 

Static Public Member Functions

static PointerIntPair getFromOpaqueValue (void *V)
 
static PointerIntPair getFromOpaqueValue (const void *V)
 

Detailed Description

template<typename PointerTy, unsigned IntBits, typename IntType = unsigned, typename PtrTraits = PointerLikeTypeTraits<PointerTy>>
class llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits >

PointerIntPair - This class implements a pair of a pointer and small integer. It is designed to represent this in the space required by one pointer by bitmangling the integer into the low part of the pointer. This can only be done for small integers: typically up to 3 bits, but it depends on the number of bits available according to PointerLikeTypeTraits for the type.

Note that PointerIntPair always puts the IntVal part in the highest bits possible. For example, PointerIntPair<void*, 1, bool> will put the bit for the bool into bit #2, not bit #0, which allows the low two bits to be used for something else. For example, this allows: PointerIntPair<PointerIntPair<void*, 1, bool>, 1, bool> ... and the two bools will land in different bits.

Definition at line 42 of file PointerIntPair.h.

Constructor & Destructor Documentation

template<typename PointerTy, unsigned IntBits, typename IntType = unsigned, typename PtrTraits = PointerLikeTypeTraits<PointerTy>>
llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits >::PointerIntPair ( )
inline

Definition at line 60 of file PointerIntPair.h.

template<typename PointerTy, unsigned IntBits, typename IntType = unsigned, typename PtrTraits = PointerLikeTypeTraits<PointerTy>>
llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits >::PointerIntPair ( PointerTy  PtrVal,
IntType  IntVal 
)
inline

Definition at line 61 of file PointerIntPair.h.

template<typename PointerTy, unsigned IntBits, typename IntType = unsigned, typename PtrTraits = PointerLikeTypeTraits<PointerTy>>
llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits >::PointerIntPair ( PointerTy  PtrVal)
inlineexplicit

Definition at line 66 of file PointerIntPair.h.

Member Function Documentation

template<typename PointerTy, unsigned IntBits, typename IntType = unsigned, typename PtrTraits = PointerLikeTypeTraits<PointerTy>>
PointerTy const* llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits >::getAddrOfPointer ( ) const
inline
template<typename PointerTy, unsigned IntBits, typename IntType = unsigned, typename PtrTraits = PointerLikeTypeTraits<PointerTy>>
PointerTy* llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits >::getAddrOfPointer ( )
inline

Definition at line 120 of file PointerIntPair.h.

template<typename PointerTy, unsigned IntBits, typename IntType = unsigned, typename PtrTraits = PointerLikeTypeTraits<PointerTy>>
static PointerIntPair llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits >::getFromOpaqueValue ( void *  V)
inlinestatic
template<typename PointerTy, unsigned IntBits, typename IntType = unsigned, typename PtrTraits = PointerLikeTypeTraits<PointerTy>>
static PointerIntPair llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits >::getFromOpaqueValue ( const void *  V)
inlinestatic

Definition at line 136 of file PointerIntPair.h.

template<typename PointerTy, unsigned IntBits, typename IntType = unsigned, typename PtrTraits = PointerLikeTypeTraits<PointerTy>>
IntType llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits >::getInt ( ) const
inline
template<typename PointerTy, unsigned IntBits, typename IntType = unsigned, typename PtrTraits = PointerLikeTypeTraits<PointerTy>>
void* llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits >::getOpaqueValue ( ) const
inline
template<typename PointerTy, unsigned IntBits, typename IntType = unsigned, typename PtrTraits = PointerLikeTypeTraits<PointerTy>>
PointerTy llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits >::getPointer ( ) const
inline
template<typename PointerTy, unsigned IntBits, typename IntType = unsigned, typename PtrTraits = PointerLikeTypeTraits<PointerTy>>
void llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits >::initWithPointer ( PointerTy  PtrVal)
inline
template<typename PointerTy, unsigned IntBits, typename IntType = unsigned, typename PtrTraits = PointerLikeTypeTraits<PointerTy>>
bool llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits >::operator!= ( const PointerIntPair< PointerTy, IntBits, IntType, PtrTraits > &  RHS) const
inline

Definition at line 142 of file PointerIntPair.h.

template<typename PointerTy, unsigned IntBits, typename IntType = unsigned, typename PtrTraits = PointerLikeTypeTraits<PointerTy>>
bool llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits >::operator< ( const PointerIntPair< PointerTy, IntBits, IntType, PtrTraits > &  RHS) const
inline

Definition at line 143 of file PointerIntPair.h.

template<typename PointerTy, unsigned IntBits, typename IntType = unsigned, typename PtrTraits = PointerLikeTypeTraits<PointerTy>>
bool llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits >::operator<= ( const PointerIntPair< PointerTy, IntBits, IntType, PtrTraits > &  RHS) const
inline

Definition at line 145 of file PointerIntPair.h.

template<typename PointerTy, unsigned IntBits, typename IntType = unsigned, typename PtrTraits = PointerLikeTypeTraits<PointerTy>>
bool llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits >::operator== ( const PointerIntPair< PointerTy, IntBits, IntType, PtrTraits > &  RHS) const
inline

Definition at line 141 of file PointerIntPair.h.

template<typename PointerTy, unsigned IntBits, typename IntType = unsigned, typename PtrTraits = PointerLikeTypeTraits<PointerTy>>
bool llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits >::operator> ( const PointerIntPair< PointerTy, IntBits, IntType, PtrTraits > &  RHS) const
inline

Definition at line 144 of file PointerIntPair.h.

template<typename PointerTy, unsigned IntBits, typename IntType = unsigned, typename PtrTraits = PointerLikeTypeTraits<PointerTy>>
bool llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits >::operator>= ( const PointerIntPair< PointerTy, IntBits, IntType, PtrTraits > &  RHS) const
inline

Definition at line 146 of file PointerIntPair.h.

template<typename PointerTy, unsigned IntBits, typename IntType = unsigned, typename PtrTraits = PointerLikeTypeTraits<PointerTy>>
void llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits >::setFromOpaqueValue ( void *  Val)
inline
template<typename PointerTy, unsigned IntBits, typename IntType = unsigned, typename PtrTraits = PointerLikeTypeTraits<PointerTy>>
void llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits >::setInt ( IntType  IntVal)
inline
template<typename PointerTy, unsigned IntBits, typename IntType = unsigned, typename PtrTraits = PointerLikeTypeTraits<PointerTy>>
void llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits >::setPointer ( PointerTy  PtrVal)
inline
template<typename PointerTy, unsigned IntBits, typename IntType = unsigned, typename PtrTraits = PointerLikeTypeTraits<PointerTy>>
void llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits >::setPointerAndInt ( PointerTy  PtrVal,
IntType  IntVal 
)
inline

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