struct LazyOffsetPtr

Declaration

template <typename T,
          typename OffsT,
          T* (clang::ExternalASTSource::*)(OffsT)Get>
struct LazyOffsetPtr { /* full declaration omitted */ };

Description

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.

Declared at: clang/include/clang/AST/ExternalASTSource.h:323

Templates

T
OffsT
T *(clang::ExternalASTSource::*)(OffsT) Get

Member Variables

public uint64_t Ptr = 0
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.

Method Overview

Methods

LazyOffsetPtr<T, OffsT, Get>()

Declared at: clang/include/clang/AST/ExternalASTSource.h:332

LazyOffsetPtr<T, OffsT, Get>(T* Ptr)

Declared at: clang/include/clang/AST/ExternalASTSource.h:333

Parameters

T* Ptr

LazyOffsetPtr<T, OffsT, Get>(uint64_t Offset)

Declared at: clang/include/clang/AST/ExternalASTSource.h:335

Parameters

uint64_t Offset

T* get(clang::ExternalASTSource* Source) const

Description

Retrieve the pointer to the AST node that this lazy pointer points to.

Declared at: clang/include/clang/AST/ExternalASTSource.h:374

Parameters

clang::ExternalASTSource* Source
the external AST source.

Returns

a pointer to the AST node.

bool isOffset() const

Description

Whether this pointer is currently stored as an offset.

Declared at: clang/include/clang/AST/ExternalASTSource.h:367

bool isValid() const

Description

Whether this pointer is non-NULL. This operation does not require the AST node to be deserialized.

Declared at: clang/include/clang/AST/ExternalASTSource.h:364

bool operator bool() const

Description

Whether this pointer is non-NULL. This operation does not require the AST node to be deserialized.

Declared at: clang/include/clang/AST/ExternalASTSource.h:359