clang 22.0.0git
clang::LazyGenerationalUpdatePtr< Owner, T, Update > Struct Template Reference

A lazy value (of type T) that is within an AST node of type Owner, where the value might change in later generations of the external AST source. More...

#include "clang/AST/ExternalASTSource.h"

Inheritance diagram for clang::LazyGenerationalUpdatePtr< Owner, T, Update >:
[legend]

Classes

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

Public Types

enum  NotUpdatedTag { NotUpdated }
 Create a pointer that is not potentially updated by later generations of the external AST source. More...
using ValueType = llvm::PointerUnion<T, LazyData*>

Public Member Functions

 LazyGenerationalUpdatePtr (ValueType V)
 LazyGenerationalUpdatePtr (const ASTContext &Ctx, T Value=T())
 LazyGenerationalUpdatePtr (NotUpdatedTag, T Value=T())
void markIncomplete ()
 Forcibly set this pointer (which must be lazy) as needing updates.
void set (T NewValue)
 Set the value of this pointer, in the current generation.
void setNotUpdated (T NewValue)
 Set the value of this pointer, for this and all future generations.
T get (Owner O)
 Get the value of this pointer, updating its owner if necessary.
T getNotUpdated () 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, T Value)
 Create the representation of a LazyGenerationalUpdatePtr.
static LazyGenerationalUpdatePtr getFromOpaqueValue (void *Ptr)

Public Attributes

ValueType Value

Detailed Description

template<typename Owner, typename T, void(ExternalASTSource::*)(Owner) Update>
struct clang::LazyGenerationalUpdatePtr< Owner, T, Update >

A lazy value (of type T) that is within an AST node of type Owner, where the value might change in later generations of the external AST source.

Definition at line 446 of file ExternalASTSource.h.

Member Typedef Documentation

◆ ValueType

template<typename Owner, typename T, void(ExternalASTSource::*)(Owner) Update>
using clang::LazyGenerationalUpdatePtr< Owner, T, Update >::ValueType = llvm::PointerUnion<T, LazyData*>

Definition at line 459 of file ExternalASTSource.h.

Member Enumeration Documentation

◆ NotUpdatedTag

template<typename Owner, typename T, void(ExternalASTSource::*)(Owner) Update>
enum clang::LazyGenerationalUpdatePtr::NotUpdatedTag

Create a pointer that is not potentially updated by later generations of the external AST source.

Enumerator
NotUpdated 

Definition at line 473 of file ExternalASTSource.h.

Constructor & Destructor Documentation

◆ LazyGenerationalUpdatePtr() [1/3]

template<typename Owner, typename T, void(ExternalASTSource::*)(Owner) Update>
clang::LazyGenerationalUpdatePtr< Owner, T, Update >::LazyGenerationalUpdatePtr ( ValueType V)
inline

◆ LazyGenerationalUpdatePtr() [2/3]

template<typename Owner, typename T, void(ExternalASTSource::*)(Owner) Update>
clang::LazyGenerationalUpdatePtr< Owner, T, Update >::LazyGenerationalUpdatePtr ( const ASTContext & Ctx,
T Value = T() )
inlineexplicit

Definition at line 468 of file ExternalASTSource.h.

◆ LazyGenerationalUpdatePtr() [3/3]

template<typename Owner, typename T, void(ExternalASTSource::*)(Owner) Update>
clang::LazyGenerationalUpdatePtr< Owner, T, Update >::LazyGenerationalUpdatePtr ( NotUpdatedTag ,
T Value = T() )
inline

Definition at line 474 of file ExternalASTSource.h.

Member Function Documentation

◆ get()

template<typename Owner, typename T, void(ExternalASTSource::*)(Owner) Update>
T clang::LazyGenerationalUpdatePtr< Owner, T, Update >::get ( Owner O)
inline

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

Definition at line 493 of file ExternalASTSource.h.

◆ getFromOpaqueValue()

template<typename Owner, typename T, void(ExternalASTSource::*)(Owner) Update>
LazyGenerationalUpdatePtr clang::LazyGenerationalUpdatePtr< Owner, T, Update >::getFromOpaqueValue ( void * Ptr)
inlinestatic

◆ getNotUpdated()

template<typename Owner, typename T, void(ExternalASTSource::*)(Owner) Update>
T clang::LazyGenerationalUpdatePtr< Owner, T, Update >::getNotUpdated ( ) const
inline

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

Definition at line 505 of file ExternalASTSource.h.

◆ getOpaqueValue()

template<typename Owner, typename T, void(ExternalASTSource::*)(Owner) Update>
void * clang::LazyGenerationalUpdatePtr< Owner, T, Update >::getOpaqueValue ( )
inline

◆ makeValue()

template<typename Owner, typename T, void(clang::ExternalASTSource::*)(Owner) Update>
template clang::LazyGenerationalUpdatePtr< constDecl *, Decl *,&ExternalASTSource::CompleteRedeclChain >::ValueType clang::LazyGenerationalUpdatePtr< Owner, T, Update >::makeValue ( const ASTContext & Ctx,
T Value )
static

Create the representation of a LazyGenerationalUpdatePtr.

Definition at line 3836 of file ASTContext.h.

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

Referenced by makeValue().

◆ markIncomplete()

template<typename Owner, typename T, void(ExternalASTSource::*)(Owner) Update>
void clang::LazyGenerationalUpdatePtr< Owner, T, Update >::markIncomplete ( )
inline

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

Definition at line 478 of file ExternalASTSource.h.

◆ set()

template<typename Owner, typename T, void(ExternalASTSource::*)(Owner) Update>
void clang::LazyGenerationalUpdatePtr< Owner, T, Update >::set ( T NewValue)
inline

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

Definition at line 481 of file ExternalASTSource.h.

◆ setNotUpdated()

template<typename Owner, typename T, void(ExternalASTSource::*)(Owner) Update>
void clang::LazyGenerationalUpdatePtr< Owner, T, Update >::setNotUpdated ( T NewValue)
inline

Set the value of this pointer, for this and all future generations.

Definition at line 490 of file ExternalASTSource.h.

Member Data Documentation

◆ Value

template<typename Owner, typename T, void(ExternalASTSource::*)(Owner) Update>
ValueType clang::LazyGenerationalUpdatePtr< Owner, T, Update >::Value

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