LLVM 20.0.0git
Public Member Functions | List of all members
llvm::RecordKeeper Class Reference

#include "llvm/TableGen/Record.h"

Public Member Functions

 RecordKeeper ()
 
 ~RecordKeeper ()
 
detail::RecordKeeperImplgetImpl ()
 Return the internal implementation of the RecordKeeper.
 
const std::string getInputFilename () const
 Get the main TableGen input file's name.
 
const RecordMap & getClasses () const
 Get the map of classes.
 
const RecordMap & getDefs () const
 Get the map of records (defs).
 
const GlobalMap & getGlobals () const
 Get the map of global variables.
 
const RecordgetClass (StringRef Name) const
 Get the class with the specified name.
 
const RecordgetDef (StringRef Name) const
 Get the concrete record with the specified name.
 
const InitgetGlobal (StringRef Name) const
 Get the Init value of the specified global variable.
 
void saveInputFilename (std::string Filename)
 
void addClass (std::unique_ptr< Record > R)
 
void addDef (std::unique_ptr< Record > R)
 
void addExtraGlobal (StringRef Name, const Init *I)
 
const InitgetNewAnonymousName ()
 GetNewAnonymousName - Generate a unique anonymous name that can be used as an identifier.
 
TGTimergetTimer () const
 
ArrayRef< const Record * > getAllDerivedDefinitions (StringRef ClassName) const
 Get all the concrete records that inherit from the one specified class.
 
std::vector< const Record * > getAllDerivedDefinitions (ArrayRef< StringRef > ClassNames) const
 Get all the concrete records that inherit from all the specified classes.
 
ArrayRef< const Record * > getAllDerivedDefinitionsIfDefined (StringRef ClassName) const
 Get all the concrete records that inherit from specified class, if the class is defined.
 
void dump () const
 
void dumpAllocationStats (raw_ostream &OS) const
 

Detailed Description

Definition at line 1980 of file Record.h.

Constructor & Destructor Documentation

◆ RecordKeeper()

RecordKeeper::RecordKeeper ( )

Definition at line 3264 of file Record.cpp.

◆ ~RecordKeeper()

RecordKeeper::~RecordKeeper ( )
default

Member Function Documentation

◆ addClass()

void llvm::RecordKeeper::addClass ( std::unique_ptr< Record R)
inline

Definition at line 2027 of file Record.h.

References assert().

◆ addDef()

void llvm::RecordKeeper::addDef ( std::unique_ptr< Record R)
inline

Definition at line 2034 of file Record.h.

References assert().

◆ addExtraGlobal()

void llvm::RecordKeeper::addExtraGlobal ( StringRef  Name,
const Init I 
)
inline

Definition at line 2041 of file Record.h.

References assert(), getDef(), I, and Name.

◆ dump()

LLVM_DUMP_METHOD void RecordKeeper::dump ( ) const

Definition at line 3271 of file Record.cpp.

References llvm::errs().

◆ dumpAllocationStats()

void RecordKeeper::dumpAllocationStats ( raw_ostream OS) const

Definition at line 3331 of file Record.cpp.

References OS.

◆ getAllDerivedDefinitions() [1/2]

std::vector< const Record * > RecordKeeper::getAllDerivedDefinitions ( ArrayRef< StringRef ClassNames) const

Get all the concrete records that inherit from all the specified classes.

The classes must be defined.

Definition at line 3302 of file Record.cpp.

References llvm::all_of(), assert(), getClass(), getDefs(), llvm::PrintFatalError(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::ArrayRef< T >::size(), and llvm::sort().

◆ getAllDerivedDefinitions() [2/2]

ArrayRef< const Record * > RecordKeeper::getAllDerivedDefinitions ( StringRef  ClassName) const

◆ getAllDerivedDefinitionsIfDefined()

ArrayRef< const Record * > RecordKeeper::getAllDerivedDefinitionsIfDefined ( StringRef  ClassName) const

Get all the concrete records that inherit from specified class, if the class is defined.

Returns an empty vector if the class is not defined.

Definition at line 3325 of file Record.cpp.

References getAllDerivedDefinitions(), and getClass().

◆ getClass()

const Record * llvm::RecordKeeper::getClass ( StringRef  Name) const
inline

Get the class with the specified name.

Definition at line 2004 of file Record.h.

References I, and Name.

Referenced by getAllDerivedDefinitions(), and getAllDerivedDefinitionsIfDefined().

◆ getClasses()

const RecordMap & llvm::RecordKeeper::getClasses ( ) const
inline

Get the map of classes.

Definition at line 1995 of file Record.h.

Referenced by llvm::operator<<().

◆ getDef()

const Record * llvm::RecordKeeper::getDef ( StringRef  Name) const
inline

Get the concrete record with the specified name.

Definition at line 2010 of file Record.h.

References I, and Name.

Referenced by addExtraGlobal(), llvm::UnOpInit::Fold(), llvm::ExistsOpInit::Fold(), and getGlobal().

◆ getDefs()

const RecordMap & llvm::RecordKeeper::getDefs ( ) const
inline

Get the map of records (defs).

Definition at line 1998 of file Record.h.

Referenced by getAllDerivedDefinitions(), and llvm::operator<<().

◆ getGlobal()

const Init * llvm::RecordKeeper::getGlobal ( StringRef  Name) const
inline

Get the Init value of the specified global variable.

Definition at line 2016 of file Record.h.

References getDef(), and Name.

◆ getGlobals()

const GlobalMap & llvm::RecordKeeper::getGlobals ( ) const
inline

Get the map of global variables.

Definition at line 2001 of file Record.h.

◆ getImpl()

detail::RecordKeeperImpl & llvm::RecordKeeper::getImpl ( )
inline

◆ getInputFilename()

const std::string llvm::RecordKeeper::getInputFilename ( ) const
inline

Get the main TableGen input file's name.

Definition at line 1992 of file Record.h.

◆ getNewAnonymousName()

const Init * RecordKeeper::getNewAnonymousName ( )

GetNewAnonymousName - Generate a unique anonymous name that can be used as an identifier.

Definition at line 3287 of file Record.cpp.

References llvm::AnonymousNameInit::get(), and getImpl().

◆ getTimer()

TGTimer & llvm::RecordKeeper::getTimer ( ) const
inline

Definition at line 2050 of file Record.h.

◆ saveInputFilename()

void llvm::RecordKeeper::saveInputFilename ( std::string  Filename)
inline

Definition at line 2023 of file Record.h.


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