LLDB mainline
|
Represents a generic declaration such as a function declaration. More...
#include <CompilerDecl.h>
Public Member Functions | |
CompilerDecl ()=default | |
CompilerDecl (TypeSystem *type_system, void *decl) | |
Creates a CompilerDecl with the given TypeSystem and opaque pointer. | |
operator bool () const | |
bool | operator< (const CompilerDecl &rhs) const |
bool | IsValid () const |
TypeSystem * | GetTypeSystem () const |
void * | GetOpaqueDecl () const |
void | SetDecl (TypeSystem *type_system, void *decl) |
void | Clear () |
ConstString | GetName () const |
ConstString | GetMangledName () const |
CompilerDeclContext | GetDeclContext () const |
CompilerType | GetFunctionReturnType () const |
size_t | GetNumFunctionArguments () const |
CompilerType | GetFunctionArgumentType (size_t arg_idx) const |
Private Attributes | |
TypeSystem * | m_type_system = nullptr |
void * | m_opaque_decl = nullptr |
Represents a generic declaration such as a function declaration.
This class serves as an abstraction for a declaration inside one of the TypeSystems implemented by the language plugins. It does not have any actual logic in it but only stores an opaque pointer and a pointer to the TypeSystem that gives meaning to this opaque pointer. All methods of this class should call their respective method in the TypeSystem interface and pass the opaque pointer along.
Definition at line 28 of file CompilerDecl.h.
|
default |
|
inline |
Creates a CompilerDecl with the given TypeSystem and opaque pointer.
This constructor should only be called from the respective TypeSystem implementation.
Definition at line 37 of file CompilerDecl.h.
|
inline |
Definition at line 65 of file CompilerDecl.h.
References m_opaque_decl, and m_type_system.
CompilerDeclContext CompilerDecl::GetDeclContext | ( | ) | const |
Definition at line 23 of file CompilerDecl.cpp.
References lldb_private::TypeSystem::DeclGetDeclContext(), m_opaque_decl, and m_type_system.
Referenced by lldb_private::TypeMemberFunctionImpl::GetDescription().
CompilerType CompilerDecl::GetFunctionArgumentType | ( | size_t | arg_idx | ) | const |
Definition at line 35 of file CompilerDecl.cpp.
References lldb_private::TypeSystem::DeclGetFunctionArgumentType(), m_opaque_decl, and m_type_system.
Referenced by lldb_private::TypeMemberFunctionImpl::GetArgumentAtIndex().
CompilerType CompilerDecl::GetFunctionReturnType | ( | ) | const |
Definition at line 27 of file CompilerDecl.cpp.
References lldb_private::TypeSystem::DeclGetFunctionReturnType(), m_opaque_decl, and m_type_system.
Referenced by lldb_private::TypeMemberFunctionImpl::GetReturnType().
ConstString CompilerDecl::GetMangledName | ( | ) | const |
Definition at line 19 of file CompilerDecl.cpp.
References lldb_private::TypeSystem::DeclGetMangledName(), m_opaque_decl, and m_type_system.
Referenced by lldb_private::TypeMemberFunctionImpl::GetMangledName().
ConstString CompilerDecl::GetName | ( | ) | const |
Definition at line 15 of file CompilerDecl.cpp.
References lldb_private::TypeSystem::DeclGetName(), m_opaque_decl, and m_type_system.
Referenced by lldb_private::SymbolFileOnDemand::GetDeclForUID().
size_t CompilerDecl::GetNumFunctionArguments | ( | ) | const |
Definition at line 31 of file CompilerDecl.cpp.
References lldb_private::TypeSystem::DeclGetFunctionNumArguments(), m_opaque_decl, and m_type_system.
Referenced by lldb_private::TypeMemberFunctionImpl::GetNumArguments().
|
inline |
Definition at line 58 of file CompilerDecl.h.
References m_opaque_decl.
Referenced by DWARFASTParserClang::GetClangDeclForDIE(), lldb_private::ClangUtil::GetDecl(), lldb_private::operator!=(), and lldb_private::operator==().
|
inline |
Definition at line 56 of file CompilerDecl.h.
References m_type_system.
Referenced by lldb_private::ClangUtil::GetDecl(), lldb_private::operator!=(), and lldb_private::operator==().
|
inline |
Definition at line 50 of file CompilerDecl.h.
References m_opaque_decl, and m_type_system.
Referenced by operator bool().
|
inlineexplicit |
Definition at line 42 of file CompilerDecl.h.
References IsValid().
|
inline |
Definition at line 44 of file CompilerDecl.h.
References m_opaque_decl, and m_type_system.
|
inline |
Definition at line 60 of file CompilerDecl.h.
References m_opaque_decl, and m_type_system.
|
private |
Definition at line 89 of file CompilerDecl.h.
Referenced by Clear(), GetDeclContext(), GetFunctionArgumentType(), GetFunctionReturnType(), GetMangledName(), GetName(), GetNumFunctionArguments(), GetOpaqueDecl(), IsValid(), operator<(), and SetDecl().
|
private |
Definition at line 88 of file CompilerDecl.h.
Referenced by Clear(), GetDeclContext(), GetFunctionArgumentType(), GetFunctionReturnType(), GetMangledName(), GetName(), GetNumFunctionArguments(), GetTypeSystem(), IsValid(), operator<(), and SetDecl().