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 | |
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 | |
uint64_t | Ptr = 0 |
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 323 of file ExternalASTSource.h.
|
default |
|
inlineexplicit |
Definition at line 333 of file ExternalASTSource.h.
|
inlineexplicit |
Definition at line 335 of file ExternalASTSource.h.
References clang::LazyOffsetPtr< T, OffsT, Get >::Ptr.
|
inline |
Retrieve the pointer to the AST node that this lazy pointer points to.
Source | the external AST source. |
Definition at line 374 of file ExternalASTSource.h.
References clang::LazyOffsetPtr< T, OffsT, Get >::isOffset(), clang::LazyOffsetPtr< T, OffsT, Get >::Ptr, and clang::T.
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 385 of file ExternalASTSource.h.
References clang::LazyOffsetPtr< T, OffsT, Get >::get(), clang::LazyOffsetPtr< T, OffsT, Get >::Ptr, and clang::T.
|
inline |
Whether this pointer is currently stored as an offset.
Definition at line 367 of file ExternalASTSource.h.
References clang::LazyOffsetPtr< T, OffsT, Get >::Ptr.
Referenced by clang::LazyOffsetPtr< T, OffsT, Get >::get(), clang::ASTContext::getCurrentKeyFunction(), and clang::FieldDecl::getInClassInitializer().
|
inline |
Whether this pointer is non-NULL.
This operation does not require the AST node to be deserialized.
Definition at line 364 of file ExternalASTSource.h.
References clang::LazyOffsetPtr< T, OffsT, Get >::Ptr.
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 359 of file ExternalASTSource.h.
References clang::LazyOffsetPtr< T, OffsT, Get >::Ptr.
|
inline |
Definition at line 341 of file ExternalASTSource.h.
References clang::LazyOffsetPtr< T, OffsT, Get >::Ptr.
|
inline |
Definition at line 346 of file ExternalASTSource.h.
References clang::LazyOffsetPtr< T, OffsT, Get >::Ptr.
|
mutable |
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 329 of file ExternalASTSource.h.
Referenced by clang::LazyOffsetPtr< T, OffsT, Get >::get(), clang::LazyOffsetPtr< T, OffsT, Get >::getAddressOfPointer(), clang::LazyOffsetPtr< T, OffsT, Get >::isOffset(), clang::LazyOffsetPtr< T, OffsT, Get >::isValid(), clang::LazyOffsetPtr< T, OffsT, Get >::LazyOffsetPtr(), clang::LazyOffsetPtr< T, OffsT, Get >::operator bool(), and clang::LazyOffsetPtr< T, OffsT, Get >::operator=().