clang 20.0.0git
|
A lazy pointer to an AST node (of base type T) that resides within an external AST source. More...
#include "clang/AST/ExternalASTSource.h"
Public Member Functions | |
unsigned char | GetLSB () const |
template<typename U > | |
U & | As (bool New) const |
T *& | GetPtr () const |
uint64_t & | GetU64 () const |
void | SetPtr (T *Ptr) const |
void | SetU64 (uint64_t U64) const |
LazyOffsetPtr ()=default | |
LazyOffsetPtr (T *Ptr) | |
LazyOffsetPtr (uint64_t Offset) | |
LazyOffsetPtr & | operator= (T *Ptr) |
LazyOffsetPtr & | operator= (uint64_t Offset) |
operator bool () const | |
Whether this pointer is non-NULL. | |
bool | isValid () const |
Whether this pointer is non-NULL. | |
bool | isOffset () const |
Whether this pointer is currently stored as an offset. | |
T * | get (ExternalASTSource *Source) const |
Retrieve the pointer to the AST node that this lazy pointer points to. | |
T ** | getAddressOfPointer (ExternalASTSource *Source) const |
Retrieve the address of the AST node pointer. | |
Public Attributes | |
unsigned char | Data [DataSize] = {} |
Static Public Attributes | |
static constexpr size_t | DataSize = std::max(sizeof(uint64_t), sizeof(T *)) |
Either a pointer to an AST node or the offset within the external AST source where the AST node can be found. | |
A lazy pointer to an AST node (of base type T) that resides within an external AST source.
The AST node is identified within the external AST source by a 63-bit offset, and can be retrieved via an operation on the external AST source itself.
Definition at line 348 of file ExternalASTSource.h.
|
default |
|
inlineexplicit |
Definition at line 376 of file ExternalASTSource.h.
References clang::LazyOffsetPtr< T, OffsT, Get >::SetPtr().
|
inlineexplicit |
Definition at line 378 of file ExternalASTSource.h.
References clang::LazyOffsetPtr< T, OffsT, Get >::SetPtr(), and clang::LazyOffsetPtr< T, OffsT, Get >::SetU64().
|
inline |
Definition at line 361 of file ExternalASTSource.h.
References clang::LazyOffsetPtr< T, OffsT, Get >::Data, and clang::LazyOffsetPtr< T, OffsT, Get >::DataSize.
|
inline |
Retrieve the pointer to the AST node that this lazy pointer points to.
Source | the external AST source. |
Definition at line 419 of file ExternalASTSource.h.
References clang::LazyOffsetPtr< T, OffsT, Get >::GetPtr(), clang::LazyOffsetPtr< T, OffsT, Get >::GetU64(), clang::LazyOffsetPtr< T, OffsT, Get >::isOffset(), and clang::LazyOffsetPtr< T, OffsT, Get >::SetPtr().
Referenced by clang::LazyOffsetPtr< T, OffsT, Get >::getAddressOfPointer(), clang::ObjCMethodDecl::getBody(), clang::ASTContext::getCurrentKeyFunction(), clang::FieldDecl::getInClassInitializer(), clang::OMPDeclareReductionDecl::getPrevDeclInScope(), clang::OMPDeclareMapperDecl::getPrevDeclInScope(), clang::Sema::getStdAlignValT(), clang::Sema::getStdBadAlloc(), clang::Sema::getStdNamespace(), clang::CXXConstructorDecl::init_begin(), clang::ObjCImplementationDecl::init_begin(), and clang::ASTContext::setNonKeyFunction().
|
inline |
Retrieve the address of the AST node pointer.
Deserializes the pointee if necessary.
Definition at line 430 of file ExternalASTSource.h.
References clang::LazyOffsetPtr< T, OffsT, Get >::get(), and clang::LazyOffsetPtr< T, OffsT, Get >::GetPtr().
|
inline |
Definition at line 357 of file ExternalASTSource.h.
References clang::LazyOffsetPtr< T, OffsT, Get >::Data, and clang::LazyOffsetPtr< T, OffsT, Get >::DataSize.
Referenced by clang::LazyOffsetPtr< T, OffsT, Get >::isOffset().
|
inline |
|
inline |
Definition at line 370 of file ExternalASTSource.h.
Referenced by clang::LazyOffsetPtr< T, OffsT, Get >::get().
|
inline |
Whether this pointer is currently stored as an offset.
Definition at line 412 of file ExternalASTSource.h.
References clang::LazyOffsetPtr< T, OffsT, Get >::GetLSB().
Referenced by clang::LazyOffsetPtr< T, OffsT, Get >::get(), clang::ASTContext::getCurrentKeyFunction(), clang::FieldDecl::getInClassInitializer(), clang::LazyOffsetPtr< T, OffsT, Get >::isValid(), and clang::LazyOffsetPtr< T, OffsT, Get >::operator bool().
|
inline |
Whether this pointer is non-NULL.
This operation does not require the AST node to be deserialized.
Definition at line 409 of file ExternalASTSource.h.
References clang::LazyOffsetPtr< T, OffsT, Get >::GetPtr(), and clang::LazyOffsetPtr< T, OffsT, Get >::isOffset().
Referenced by clang::ASTContext::getCurrentKeyFunction(), and clang::ObjCMethodDecl::hasBody().
|
inlineexplicit |
Whether this pointer is non-NULL.
This operation does not require the AST node to be deserialized.
Definition at line 404 of file ExternalASTSource.h.
References clang::LazyOffsetPtr< T, OffsT, Get >::GetPtr(), and clang::LazyOffsetPtr< T, OffsT, Get >::isOffset().
|
inline |
Definition at line 386 of file ExternalASTSource.h.
References clang::LazyOffsetPtr< T, OffsT, Get >::SetPtr().
|
inline |
Definition at line 391 of file ExternalASTSource.h.
References clang::LazyOffsetPtr< T, OffsT, Get >::SetPtr(), and clang::LazyOffsetPtr< T, OffsT, Get >::SetU64().
|
inline |
Definition at line 371 of file ExternalASTSource.h.
Referenced by clang::LazyOffsetPtr< T, OffsT, Get >::get(), clang::LazyOffsetPtr< T, OffsT, Get >::LazyOffsetPtr(), and clang::LazyOffsetPtr< T, OffsT, Get >::operator=().
|
inline |
Definition at line 372 of file ExternalASTSource.h.
Referenced by clang::LazyOffsetPtr< T, OffsT, Get >::LazyOffsetPtr(), and clang::LazyOffsetPtr< T, OffsT, Get >::operator=().
|
mutable |
Definition at line 355 of file ExternalASTSource.h.
Referenced by clang::LazyOffsetPtr< T, OffsT, Get >::As(), and clang::LazyOffsetPtr< T, OffsT, Get >::GetLSB().
|
staticconstexpr |
Either a pointer to an AST node or the offset within the external AST source where the AST node can be found.
If the low bit is clear, a pointer to the AST node. If the low bit is set, the upper 63 bits are the offset.
Definition at line 354 of file ExternalASTSource.h.
Referenced by clang::LazyOffsetPtr< T, OffsT, Get >::As(), and clang::LazyOffsetPtr< T, OffsT, Get >::GetLSB().