LLVM 24.0.0git
llvm::Resolver Class Referenceabstract

Interface for looking up the initializer for a variable name, used by Init::resolveReferences. More...

#include "llvm/TableGen/Record.h"

Inheritance diagram for llvm::Resolver:
[legend]

Public Member Functions

 Resolver (const Record *CurRec)
virtual ~Resolver ()=default
const Record * getCurrentRecord () const
virtual const Init * resolve (const Init *VarName)=0
 Return the initializer for the given variable name (should normally be a StringInit), or nullptr if the name could not be resolved.
virtual bool keepUnsetBits () const
bool isFinal () const
void setFinal (bool Final)
virtual const Init * getCachedResult (const Init *I, bool &FoundUnresolved) const
 Return the cached result of resolving I, or nullptr.
virtual void cacheResult (const Init *I, const Init *Result, bool FoundUnresolved)
 Cache the result of resolving I.
virtual void noteUnresolved ()
 Called when a cached result has unresolved references.

Protected Member Functions

virtual void clearCachedResults ()

Detailed Description

Interface for looking up the initializer for a variable name, used by Init::resolveReferences.

Definition at line 2269 of file Record.h.

Constructor & Destructor Documentation

◆ Resolver()

◆ ~Resolver()

virtual llvm::Resolver::~Resolver ( )
virtualdefault

Member Function Documentation

◆ cacheResult()

virtual void llvm::Resolver::cacheResult ( const Init * I,
const Init * Result,
bool FoundUnresolved )
inlinevirtual

Cache the result of resolving I.

Reimplemented in llvm::MapResolver, llvm::RecordResolver, and llvm::TrackUnresolvedResolver.

Definition at line 2306 of file Record.h.

References I.

◆ clearCachedResults()

virtual void llvm::Resolver::clearCachedResults ( )
inlineprotectedvirtual

Reimplemented in llvm::MapResolver, and llvm::RecordResolver.

Definition at line 2313 of file Record.h.

Referenced by setFinal().

◆ getCachedResult()

virtual const Init * llvm::Resolver::getCachedResult ( const Init * I,
bool & FoundUnresolved ) const
inlinevirtual

Return the cached result of resolving I, or nullptr.

FoundUnresolved is set if the result has unresolved references.

Reimplemented in llvm::MapResolver, llvm::RecordResolver, and llvm::TrackUnresolvedResolver.

Definition at line 2300 of file Record.h.

References I.

◆ getCurrentRecord()

const Record * llvm::Resolver::getCurrentRecord ( ) const
inline

◆ isFinal()

bool llvm::Resolver::isFinal ( ) const
inline

Definition at line 2291 of file Record.h.

◆ keepUnsetBits()

virtual bool llvm::Resolver::keepUnsetBits ( ) const
inlinevirtual

Reimplemented in llvm::RecordResolver.

Definition at line 2286 of file Record.h.

◆ noteUnresolved()

virtual void llvm::Resolver::noteUnresolved ( )
inlinevirtual

Called when a cached result has unresolved references.

Reimplemented in llvm::TrackUnresolvedResolver.

Definition at line 2310 of file Record.h.

◆ resolve()

virtual const Init * llvm::Resolver::resolve ( const Init * VarName)
pure virtual

Return the initializer for the given variable name (should normally be a StringInit), or nullptr if the name could not be resolved.

Implemented in llvm::HasReferenceResolver, llvm::MapResolver, llvm::RecordResolver, llvm::ShadowResolver, and llvm::TrackUnresolvedResolver.

◆ setFinal()

void llvm::Resolver::setFinal ( bool Final)
inline

Definition at line 2293 of file Record.h.

References clearCachedResults().

Referenced by llvm::ShadowResolver::ShadowResolver().


The documentation for this class was generated from the following file: