LLDB mainline
lldb_private::CompilerType::TypeSystemSPWrapper Class Reference

This is a minimal wrapper of a TypeSystem shared pointer as returned by CompilerType which conventien dyn_cast support. More...

#include <CompilerType.h>

Public Member Functions

 TypeSystemSPWrapper ()=default
 TypeSystemSPWrapper (lldb::TypeSystemSP typesystem_sp)
template<class TypeSystemType>
bool isa_and_nonnull ()
template<class TypeSystemType>
std::shared_ptr< TypeSystemType > dyn_cast_or_null ()
 Return a shared_ptr<TypeSystemType> if dyn_cast succeeds.
 operator bool () const
bool operator== (const TypeSystemSPWrapper &other) const
bool operator!= (const TypeSystemSPWrapper &other) const
TypeSystemoperator-> () const
 Only to be used in a one-off situations like if (typesystem && typesystem->method()) Do not store this pointer!
lldb::TypeSystemSP GetSharedPointer () const

Private Attributes

lldb::TypeSystemSP m_typesystem_sp

Detailed Description

This is a minimal wrapper of a TypeSystem shared pointer as returned by CompilerType which conventien dyn_cast support.

Definition at line 50 of file CompilerType.h.

Constructor & Destructor Documentation

◆ TypeSystemSPWrapper() [1/2]

lldb_private::CompilerType::TypeSystemSPWrapper::TypeSystemSPWrapper ( )
default

Referenced by operator!=().

◆ TypeSystemSPWrapper() [2/2]

lldb_private::CompilerType::TypeSystemSPWrapper::TypeSystemSPWrapper ( lldb::TypeSystemSP typesystem_sp)
inline

Definition at line 55 of file CompilerType.h.

References m_typesystem_sp.

Member Function Documentation

◆ dyn_cast_or_null()

template<class TypeSystemType>
std::shared_ptr< TypeSystemType > lldb_private::CompilerType::TypeSystemSPWrapper::dyn_cast_or_null ( )
inline

Return a shared_ptr<TypeSystemType> if dyn_cast succeeds.

Definition at line 66 of file CompilerType.h.

References isa_and_nonnull(), and m_typesystem_sp.

Referenced by lldb_private::CompilerType::GetTypeSystem().

◆ GetSharedPointer()

◆ isa_and_nonnull()

template<class TypeSystemType>
bool lldb_private::CompilerType::TypeSystemSPWrapper::isa_and_nonnull ( )
inline

Definition at line 58 of file CompilerType.h.

References m_typesystem_sp.

Referenced by dyn_cast_or_null().

◆ operator bool()

lldb_private::CompilerType::TypeSystemSPWrapper::operator bool ( ) const
inlineexplicit

Definition at line 73 of file CompilerType.h.

References m_typesystem_sp.

◆ operator!=()

bool lldb_private::CompilerType::TypeSystemSPWrapper::operator!= ( const TypeSystemSPWrapper & other) const
inline

Definition at line 77 of file CompilerType.h.

References TypeSystemSPWrapper().

◆ operator->()

TypeSystem * CompilerType::TypeSystemSPWrapper::operator-> ( ) const

Only to be used in a one-off situations like if (typesystem && typesystem->method()) Do not store this pointer!

Definition at line 1233 of file CompilerType.cpp.

References m_typesystem_sp.

◆ operator==()

bool CompilerType::TypeSystemSPWrapper::operator== ( const TypeSystemSPWrapper & other) const

Definition at line 1224 of file CompilerType.cpp.

References m_typesystem_sp.

Member Data Documentation

◆ m_typesystem_sp

lldb::TypeSystemSP lldb_private::CompilerType::TypeSystemSPWrapper::m_typesystem_sp
private

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