LLVM 24.0.0git
llvm::FLIndex< IndexedType > Class Template Reference

Small wrapper class for an FLMD index, which may be "no index". More...

#include "llvm/IR/FunctionLocalMetadata.h"

Inheritance diagram for llvm::FLIndex< IndexedType >:
[legend]

Public Types

using IndexType = typename detail::HasFLIndex<IndexedType>::IndexType

Public Member Functions

 FLIndex ()
 FLIndex (std::nullopt_t)
 FLIndex (IndexType InIndex)
 operator bool () const
IndexType get () const
bool operator== (const FLIndex &Other) const
bool operator!= (const FLIndex &Other) const
IndexType asRaw () const

Static Public Member Functions

static FLIndex fromRaw (IndexType RawIndex)

Friends

struct DenseMapInfo< FLIndex< IndexedType > >
hash_code hash_value (const FLIndex< IndexedType > &Idx)

Detailed Description

template<typename IndexedType>
class llvm::FLIndex< IndexedType >

Small wrapper class for an FLMD index, which may be "no index".

Should be checked to see if value is present before using, otherwise the implicit/explicit index value will be invalid. Internally uses 0 as the "no index" value, and stores the internal index value as the actual index + 1, subtracting to get the real index.

Definition at line 51 of file FunctionLocalMetadata.h.

Member Typedef Documentation

◆ IndexType

template<typename IndexedType>
using llvm::FLIndex< IndexedType >::IndexType = typename detail::HasFLIndex<IndexedType>::IndexType

Definition at line 53 of file FunctionLocalMetadata.h.

Constructor & Destructor Documentation

◆ FLIndex() [1/3]

template<typename IndexedType>
llvm::FLIndex< IndexedType >::FLIndex ( )
inline

Definition at line 60 of file FunctionLocalMetadata.h.

Referenced by fromRaw(), hash_value, operator!=(), and operator==().

◆ FLIndex() [2/3]

template<typename IndexedType>
llvm::FLIndex< IndexedType >::FLIndex ( std::nullopt_t )
inline

Definition at line 61 of file FunctionLocalMetadata.h.

◆ FLIndex() [3/3]

template<typename IndexedType>
llvm::FLIndex< IndexedType >::FLIndex ( IndexType InIndex)
inline

Definition at line 62 of file FunctionLocalMetadata.h.

References assert().

Member Function Documentation

◆ asRaw()

template<typename IndexedType>
IndexType llvm::FLIndex< IndexedType >::asRaw ( ) const
inline

Definition at line 71 of file FunctionLocalMetadata.h.

◆ fromRaw()

template<typename IndexedType>
FLIndex llvm::FLIndex< IndexedType >::fromRaw ( IndexType RawIndex)
inlinestatic

Definition at line 72 of file FunctionLocalMetadata.h.

References FLIndex().

◆ get()

◆ operator bool()

template<typename IndexedType>
llvm::FLIndex< IndexedType >::operator bool ( ) const
inline

Definition at line 66 of file FunctionLocalMetadata.h.

◆ operator!=()

template<typename IndexedType>
bool llvm::FLIndex< IndexedType >::operator!= ( const FLIndex< IndexedType > & Other) const
inline

Definition at line 69 of file FunctionLocalMetadata.h.

References FLIndex(), and llvm::Other.

◆ operator==()

template<typename IndexedType>
bool llvm::FLIndex< IndexedType >::operator== ( const FLIndex< IndexedType > & Other) const
inline

Definition at line 68 of file FunctionLocalMetadata.h.

References FLIndex(), and llvm::Other.

◆ DenseMapInfo< FLIndex< IndexedType > >

template<typename IndexedType>
friend struct DenseMapInfo< FLIndex< IndexedType > >
friend

◆ hash_value

template<typename IndexedType>
hash_code hash_value ( const FLIndex< IndexedType > & Idx)
friend

Definition at line 78 of file FunctionLocalMetadata.h.

References FLIndex(), and hash_value.

Referenced by hash_value.


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