LLDB  mainline
Public Member Functions | List of all members
lldb_private::CompilerDeclContext Class Reference

#include <CompilerDeclContext.h>

Public Member Functions

 CompilerDeclContext ()
 
 CompilerDeclContext (TypeSystem *type_system, void *decl_ctx)
 
 ~CompilerDeclContext ()
 
 operator bool () const
 
bool operator< (const CompilerDeclContext &rhs) const
 
bool IsValid () const
 
bool IsClang () const
 
std::vector< CompilerDeclFindDeclByName (ConstString name, const bool ignore_using_decls)
 
bool IsClassMethod (lldb::LanguageType *language_ptr, bool *is_instance_method_ptr, ConstString *language_object_name_ptr)
 Checks if this decl context represents a method of a class. More...
 
bool IsContainedInLookup (CompilerDeclContext other) const
 Check if the given other decl context is contained in the lookup of this decl context (for example because the other context is a nested inline namespace). More...
 
TypeSystemGetTypeSystem () const
 
void * GetOpaqueDeclContext () const
 
void SetDeclContext (TypeSystem *type_system, void *decl_ctx)
 
void Clear ()
 
ConstString GetName () const
 
ConstString GetScopeQualifiedName () const
 
bool IsStructUnionOrClass () const
 

Detailed Description

Definition at line 19 of file CompilerDeclContext.h.

Constructor & Destructor Documentation

◆ CompilerDeclContext() [1/2]

lldb_private::CompilerDeclContext::CompilerDeclContext ( )
inline

Definition at line 22 of file CompilerDeclContext.h.

◆ CompilerDeclContext() [2/2]

lldb_private::CompilerDeclContext::CompilerDeclContext ( TypeSystem type_system,
void *  decl_ctx 
)
inline

Definition at line 24 of file CompilerDeclContext.h.

◆ ~CompilerDeclContext()

lldb_private::CompilerDeclContext::~CompilerDeclContext ( )
inline

Definition at line 27 of file CompilerDeclContext.h.

Member Function Documentation

◆ Clear()

void lldb_private::CompilerDeclContext::Clear ( )
inline

◆ FindDeclByName()

std::vector< CompilerDecl > CompilerDeclContext::FindDeclByName ( ConstString  name,
const bool  ignore_using_decls 
)

◆ GetName()

ConstString CompilerDeclContext::GetName ( ) const

◆ GetOpaqueDeclContext()

void* lldb_private::CompilerDeclContext::GetOpaqueDeclContext ( ) const
inline

◆ GetScopeQualifiedName()

ConstString CompilerDeclContext::GetScopeQualifiedName ( ) const

◆ GetTypeSystem()

TypeSystem* lldb_private::CompilerDeclContext::GetTypeSystem ( ) const
inline

◆ IsClang()

bool CompilerDeclContext::IsClang ( ) const

◆ IsClassMethod()

bool CompilerDeclContext::IsClassMethod ( lldb::LanguageType language_ptr,
bool *  is_instance_method_ptr,
ConstString language_object_name_ptr 
)

Checks if this decl context represents a method of a class.

Parameters
[out]language_ptrIf non NULL and true is returned from this function, this will indicate if the language that respresents the method.
[out]is_instance_method_ptrIf non NULL and true is returned from this function, this will indicate if the method is an instance function (true) or a class method (false indicating the function is static, or doesn't require an instance of the class to be called).
[out]language_object_name_ptrIf non NULL and true is returned from this function, this will indicate if implicit object name for the language like "this" for C++, and "self" for Objective C.
Returns
Returns true if this is a decl context that represents a method in a struct, union or class.

Definition at line 51 of file CompilerDeclContext.cpp.

References lldb_private::TypeSystem::DeclContextIsClassMethod(), and IsValid().

Referenced by lldb_private::ClangExpressionDeclMap::FindExternalVisibleDecls(), lldb_private::SymbolContext::GetFunctionMethodInfo(), and IsValid().

◆ IsContainedInLookup()

bool CompilerDeclContext::IsContainedInLookup ( CompilerDeclContext  other) const

Check if the given other decl context is contained in the lookup of this decl context (for example because the other context is a nested inline namespace).

Parameters
[in]otherThe other decl context for which we should check if it is contained in the lookoup of this context.
Returns
Returns true iff the other decl context is contained in the lookup of this decl context.

Definition at line 62 of file CompilerDeclContext.cpp.

References lldb_private::TypeSystem::DeclContextIsContainedInLookup(), and IsValid().

Referenced by SymbolFileDWARF::DIEInDeclContext(), and IsValid().

◆ IsStructUnionOrClass()

bool CompilerDeclContext::IsStructUnionOrClass ( ) const

◆ IsValid()

bool lldb_private::CompilerDeclContext::IsValid ( ) const
inline

◆ operator bool()

lldb_private::CompilerDeclContext::operator bool ( ) const
inlineexplicit

Definition at line 31 of file CompilerDeclContext.h.

References IsValid().

◆ operator<()

bool lldb_private::CompilerDeclContext::operator< ( const CompilerDeclContext rhs) const
inline

Definition at line 33 of file CompilerDeclContext.h.

◆ SetDeclContext()

void lldb_private::CompilerDeclContext::SetDeclContext ( TypeSystem type_system,
void *  decl_ctx 
)
inline

Definition at line 91 of file CompilerDeclContext.h.


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