clang 22.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 353 of file ExternalASTSource.h.
|
default |
|
inlineexplicit |
Definition at line 381 of file ExternalASTSource.h.
|
inlineexplicit |
Definition at line 383 of file ExternalASTSource.h.
|
inline |
Definition at line 366 of file ExternalASTSource.h.
Referenced by clang::LazyOffsetPtr< Stmt, uint64_t, &ExternalASTSource::GetExternalDeclStmt >::GetPtr(), clang::LazyOffsetPtr< Stmt, uint64_t, &ExternalASTSource::GetExternalDeclStmt >::GetU64(), clang::LazyOffsetPtr< Stmt, uint64_t, &ExternalASTSource::GetExternalDeclStmt >::SetPtr(), and clang::LazyOffsetPtr< Stmt, uint64_t, &ExternalASTSource::GetExternalDeclStmt >::SetU64().
|
inline |
Retrieve the pointer to the AST node that this lazy pointer points to.
Source | the external AST source. |
Definition at line 424 of file ExternalASTSource.h.
Referenced by clang::LazyOffsetPtr< Stmt, uint64_t, &ExternalASTSource::GetExternalDeclStmt >::getAddressOfPointer(), clang::ASTContext::getCurrentKeyFunction(), clang::FieldDecl::getInClassInitializer(), and clang::ASTContext::setNonKeyFunction().
|
inline |
Retrieve the address of the AST node pointer.
Deserializes the pointee if necessary.
Definition at line 435 of file ExternalASTSource.h.
|
inline |
Definition at line 362 of file ExternalASTSource.h.
Referenced by clang::LazyOffsetPtr< Stmt, uint64_t, &ExternalASTSource::GetExternalDeclStmt >::isOffset().
|
inline |
Definition at line 374 of file ExternalASTSource.h.
Referenced by clang::LazyOffsetPtr< Stmt, uint64_t, &ExternalASTSource::GetExternalDeclStmt >::get(), clang::LazyOffsetPtr< Stmt, uint64_t, &ExternalASTSource::GetExternalDeclStmt >::getAddressOfPointer(), clang::LazyOffsetPtr< Stmt, uint64_t, &ExternalASTSource::GetExternalDeclStmt >::isValid(), and clang::LazyOffsetPtr< Stmt, uint64_t, &ExternalASTSource::GetExternalDeclStmt >::operator bool().
|
inline |
Definition at line 375 of file ExternalASTSource.h.
Referenced by clang::LazyOffsetPtr< Stmt, uint64_t, &ExternalASTSource::GetExternalDeclStmt >::get().
|
inline |
Whether this pointer is currently stored as an offset.
Definition at line 417 of file ExternalASTSource.h.
Referenced by clang::LazyOffsetPtr< Stmt, uint64_t, &ExternalASTSource::GetExternalDeclStmt >::get(), clang::ASTContext::getCurrentKeyFunction(), clang::FieldDecl::getInClassInitializer(), clang::LazyOffsetPtr< Stmt, uint64_t, &ExternalASTSource::GetExternalDeclStmt >::isValid(), and clang::LazyOffsetPtr< Stmt, uint64_t, &ExternalASTSource::GetExternalDeclStmt >::operator bool().
|
inline |
Whether this pointer is non-NULL.
This operation does not require the AST node to be deserialized.
Definition at line 414 of file ExternalASTSource.h.
Referenced by clang::ASTContext::getCurrentKeyFunction().
|
inlineexplicit |
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.
|
inline |
Definition at line 391 of file ExternalASTSource.h.
|
inline |
Definition at line 396 of file ExternalASTSource.h.
|
inline |
Definition at line 376 of file ExternalASTSource.h.
Referenced by clang::LazyOffsetPtr< Stmt, uint64_t, &ExternalASTSource::GetExternalDeclStmt >::get(), clang::LazyOffsetPtr< Stmt, uint64_t, &ExternalASTSource::GetExternalDeclStmt >::LazyOffsetPtr(), clang::LazyOffsetPtr< Stmt, uint64_t, &ExternalASTSource::GetExternalDeclStmt >::LazyOffsetPtr(), clang::LazyOffsetPtr< Stmt, uint64_t, &ExternalASTSource::GetExternalDeclStmt >::operator=(), and clang::LazyOffsetPtr< Stmt, uint64_t, &ExternalASTSource::GetExternalDeclStmt >::operator=().
|
inline |
|
mutable |
Definition at line 360 of file ExternalASTSource.h.
|
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 359 of file ExternalASTSource.h.