LLVM  5.0.0
Public Types | Public Member Functions | Static Public Member Functions | List of all members
llvm::Optional< T > Class Template Reference

#include "llvm/ADT/Optional.h"

Inheritance diagram for llvm::Optional< T >:
[legend]

Public Types

using value_type = T
 

Public Member Functions

 Optional (NoneType)
 
 Optional ()
 
 Optional (const T &y)
 
 Optional (const Optional &O)
 
 Optional (T &&y)
 
 Optional (Optional< T > &&O)
 
 ~Optional ()
 
Optional & operator= (T &&y)
 
Optional & operator= (Optional &&O)
 
template<typename... ArgTypes>
void emplace (ArgTypes &&...Args)
 Create a new object by constructing it in place with the given arguments. More...
 
Optional & operator= (const T &y)
 
Optional & operator= (const Optional &O)
 
void reset ()
 
const T * getPointer () const
 
T * getPointer ()
 
const T & getValue () const LLVM_LVALUE_FUNCTION
 
T & getValue () LLVM_LVALUE_FUNCTION
 
 operator bool () const
 
bool hasValue () const
 
const T * operator-> () const
 
T * operator-> ()
 
const T & operator* () const LLVM_LVALUE_FUNCTION
 
T & operator* () LLVM_LVALUE_FUNCTION
 
template<typename U >
constexpr T getValueOr (U &&value) const LLVM_LVALUE_FUNCTION
 

Static Public Member Functions

static Optional create (const T *y)
 

Detailed Description

template<typename T>
class llvm::Optional< T >

Definition at line 31 of file Optional.h.

Member Typedef Documentation

template<typename T>
using llvm::Optional< T >::value_type = T

Definition at line 36 of file Optional.h.

Constructor & Destructor Documentation

template<typename T>
llvm::Optional< T >::Optional ( NoneType  )
inline

Definition at line 38 of file Optional.h.

template<typename T>
llvm::Optional< T >::Optional ( )
inlineexplicit

Definition at line 39 of file Optional.h.

Referenced by llvm::Optional< uint64_t >::create().

template<typename T>
llvm::Optional< T >::Optional ( const T &  y)
inline

Definition at line 41 of file Optional.h.

template<typename T>
llvm::Optional< T >::Optional ( const Optional< T > &  O)
inline

Definition at line 45 of file Optional.h.

template<typename T>
llvm::Optional< T >::Optional ( T &&  y)
inline

Definition at line 50 of file Optional.h.

template<typename T>
llvm::Optional< T >::Optional ( Optional< T > &&  O)
inline

Definition at line 54 of file Optional.h.

template<typename T>
llvm::Optional< T >::~Optional ( )
inline

Definition at line 61 of file Optional.h.

Member Function Documentation

template<typename T>
static Optional llvm::Optional< T >::create ( const T *  y)
inlinestatic

Definition at line 93 of file Optional.h.

template<typename T>
template<typename... ArgTypes>
void llvm::Optional< T >::emplace ( ArgTypes &&...  Args)
inline

Create a new object by constructing it in place with the given arguments.

Definition at line 87 of file Optional.h.

Referenced by llvm::pdb::NamedStreamMap::finalize(), and llvm::NamedMDNode::print().

template<typename T>
const T* llvm::Optional< T >::getPointer ( ) const
inline
template<typename T>
T* llvm::Optional< T >::getPointer ( )
inline

Definition at line 128 of file Optional.h.

template<typename T>
const T& llvm::Optional< T >::getValue ( ) const
inline
template<typename T>
T& llvm::Optional< T >::getValue ( )
inline

Definition at line 130 of file Optional.h.

template<typename T>
template<typename U >
constexpr T llvm::Optional< T >::getValueOr ( U &&  value) const
inline
template<typename T>
bool llvm::Optional< T >::hasValue ( ) const
inline

Definition at line 133 of file Optional.h.

Referenced by llvm::buildModuleSummaryIndex(), llvm::pdb::NamedStreamMap::commit(), computeKnownBitsFromShiftOperator(), createSchedInfoStr(), llvm::CodeExtractor::extractCodeRegion(), llvm::pdb::NamedStreamMap::finalize(), llvm::sys::Process::FindInEnvPath(), findPreviousSpillSlot(), llvm::format_provider< T, typename std::enable_if< detail::use_double_formatter< T >::value >::type >::format(), gatherUnrollingPreferences(), llvm::Attribute::getAsString(), GetDeoptBundleOperands(), llvm::getEffectiveRelocModel(), getEffectiveRelocModel(), getSearchPaths(), llvm::Optional< uint64_t >::getValueOr(), llvm::MachineFunction::hasWinCFI(), llvm::codeview::TypeSerializer::insertRecord(), llvm::codeview::TypeSerializer::insertRecordBytes(), IntersectRange(), llvm::libDriverMain(), llvm::codeview::CodeViewRecordIO::maxFieldLength(), llvm::raw_ostream::operator<<(), llvm::operator==(), packAllocSizeArgs(), llvm::DWARFDebugFrame::parse(), reservePreviousStackSlotForValue(), llvm::JumpThreadingPass::run(), updateCalleeCount(), updateCallProfile(), llvm::codeview::TypeRecordMapping::visitMemberBegin(), llvm::codeview::TypeSerializer::visitMemberBegin(), llvm::codeview::TypeRecordMapping::visitMemberEnd(), llvm::codeview::SymbolSerializer::visitSymbolBegin(), llvm::codeview::SymbolSerializer::visitSymbolEnd(), llvm::codeview::TypeRecordMapping::visitTypeBegin(), llvm::codeview::TypeSerializer::visitTypeBegin(), llvm::codeview::TypeRecordMapping::visitTypeEnd(), and llvm::codeview::TypeSerializer::visitTypeEndGetIndex().

template<typename T>
llvm::Optional< T >::operator bool ( ) const
inlineexplicit

Definition at line 132 of file Optional.h.

template<typename T>
const T& llvm::Optional< T >::operator* ( ) const
inline

Definition at line 136 of file Optional.h.

template<typename T>
T& llvm::Optional< T >::operator* ( )
inline

Definition at line 137 of file Optional.h.

template<typename T>
const T* llvm::Optional< T >::operator-> ( ) const
inline

Definition at line 134 of file Optional.h.

template<typename T>
T* llvm::Optional< T >::operator-> ( )
inline

Definition at line 135 of file Optional.h.

template<typename T>
Optional& llvm::Optional< T >::operator= ( T &&  y)
inline

Definition at line 65 of file Optional.h.

template<typename T>
Optional& llvm::Optional< T >::operator= ( Optional< T > &&  O)
inline

Definition at line 75 of file Optional.h.

template<typename T>
Optional& llvm::Optional< T >::operator= ( const T &  y)
inline

Definition at line 102 of file Optional.h.

template<typename T>
Optional& llvm::Optional< T >::operator= ( const Optional< T > &  O)
inline

Definition at line 112 of file Optional.h.

template<typename T>
void llvm::Optional< T >::reset ( )
inline

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