clang 24.0.0git
clang::LazyGenerationalDeclPtr Struct Reference

A lazy Decl value where the value might change in later generations of the external AST source. More...

#include "clang/AST/ExternalASTSource.h"

Classes

struct  LazyData
 A cache of the value of this pointer, in the most recent generation in which we queried it. More...

Public Types

using ValueType = llvm::PointerUnion<Decl *, LazyData *>

Public Member Functions

 LazyGenerationalDeclPtr (ValueType V)
 LazyGenerationalDeclPtr (const ASTContext &Ctx, Decl *Value=nullptr)
void markIncomplete ()
 Forcibly set this pointer (which must be lazy) as needing updates.
void set (Decl *NewValue)
 Set the value of this pointer, in the current generation.
Declget (const Decl *O)
 Get the value of this pointer, updating its owner if necessary.
DeclgetNotUpdated () const
 Get the most recently computed value of this pointer without updating it.
void * getOpaqueValue ()

Static Public Member Functions

static ValueType makeValue (const ASTContext &Ctx, Decl *Value)
static LazyGenerationalDeclPtr getFromOpaqueValue (void *Ptr)

Public Attributes

ValueType Value

Detailed Description

A lazy Decl value where the value might change in later generations of the external AST source.

Definition at line 444 of file ExternalASTSource.h.

Member Typedef Documentation

◆ ValueType

using clang::LazyGenerationalDeclPtr::ValueType = llvm::PointerUnion<Decl *, LazyData *>

Definition at line 458 of file ExternalASTSource.h.

Constructor & Destructor Documentation

◆ LazyGenerationalDeclPtr() [1/2]

clang::LazyGenerationalDeclPtr::LazyGenerationalDeclPtr ( ValueType V)
inline

Definition at line 461 of file ExternalASTSource.h.

References V, and Value.

Referenced by getFromOpaqueValue().

◆ LazyGenerationalDeclPtr() [2/2]

clang::LazyGenerationalDeclPtr::LazyGenerationalDeclPtr ( const ASTContext & Ctx,
Decl * Value = nullptr )
inlineexplicit

Definition at line 466 of file ExternalASTSource.h.

References makeValue(), and Value.

Member Function Documentation

◆ get()

Decl * clang::LazyGenerationalDeclPtr::get ( const Decl * O)
inline

Get the value of this pointer, updating its owner if necessary.

Definition at line 482 of file ExternalASTSource.h.

References clang::cast(), and Value.

◆ getFromOpaqueValue()

LazyGenerationalDeclPtr clang::LazyGenerationalDeclPtr::getFromOpaqueValue ( void * Ptr)
inlinestatic

◆ getNotUpdated()

Decl * clang::LazyGenerationalDeclPtr::getNotUpdated ( ) const
inline

Get the most recently computed value of this pointer without updating it.

Definition at line 494 of file ExternalASTSource.h.

References clang::cast(), and Value.

◆ getOpaqueValue()

void * clang::LazyGenerationalDeclPtr::getOpaqueValue ( )
inline

◆ makeValue()

LazyGenerationalDeclPtr::ValueType LazyGenerationalDeclPtr::makeValue ( const ASTContext & Ctx,
Decl * Value )
static

Definition at line 139 of file ExternalASTSource.cpp.

References clang::ASTContext::getExternalSource(), and Value.

Referenced by LazyGenerationalDeclPtr().

◆ markIncomplete()

void clang::LazyGenerationalDeclPtr::markIncomplete ( )
inline

Forcibly set this pointer (which must be lazy) as needing updates.

Definition at line 470 of file ExternalASTSource.h.

References clang::cast(), and Value.

◆ set()

void clang::LazyGenerationalDeclPtr::set ( Decl * NewValue)
inline

Set the value of this pointer, in the current generation.

Definition at line 473 of file ExternalASTSource.h.

References Value.

Member Data Documentation

◆ Value


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