LLVM 24.0.0git
llvm::RecordKeeper Class Reference

#include "llvm/TableGen/Record.h"

Public Member Functions

 RecordKeeper ()
 ~RecordKeeper ()
detail::RecordKeeperImpl & getImpl ()
 Return the internal implementation of the RecordKeeper.
StringRef getInputFilename () const
 Get the main TableGen input file's name.
ArrayRef< const Record * > getClasses () const
 Get all classes, sorted by name.
ArrayRef< const Record * > getDefs () const
 Get all records (defs), sorted by name.
const GlobalMap & getGlobals () const
 Get the map of global variables.
const Record * getClass (StringRef Name) const
 Get the class with the specified name.
const Record * getDef (StringRef Name) const
 Get the concrete record with the specified name.
const Init * getGlobal (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 Init * getNewAnonymousName ()
 GetNewAnonymousName - Generate a unique anonymous name that can be used as an identifier.
TGTimer & getTimer () 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 2046 of file Record.h.

Constructor & Destructor Documentation

◆ RecordKeeper()

RecordKeeper::RecordKeeper ( )

Definition at line 3156 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 2093 of file Record.h.

References assert().

◆ addDef()

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

Definition at line 2099 of file Record.h.

References assert().

◆ addExtraGlobal()

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

Definition at line 2108 of file Record.h.

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

◆ dump()

LLVM_DUMP_METHOD void RecordKeeper::dump ( ) const

Definition at line 3163 of file Record.cpp.

References llvm::errs(), and LLVM_DUMP_METHOD.

◆ dumpAllocationStats()

void RecordKeeper::dumpAllocationStats ( raw_ostream & OS) const

Definition at line 3249 of file Record.cpp.

◆ 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 3219 of file Record.cpp.

References llvm::all_of(), assert(), getClass(), 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

Get all the concrete records that inherit from the one specified class.

The class must be defined.

Definition at line 3184 of file Record.cpp.

References llvm::ArrayRef(), getAllDerivedDefinitions(), and llvm::StringRef::str().

Referenced by getAllDerivedDefinitions(), and getAllDerivedDefinitionsIfDefined().

◆ 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 3243 of file Record.cpp.

References getAllDerivedDefinitions(), and getClass().

Referenced by llvm::InstancesOpInit::Fold().

◆ getClass()

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

Get the class with the specified name.

Definition at line 2070 of file Record.h.

Referenced by getAllDerivedDefinitions(), and getAllDerivedDefinitionsIfDefined().

◆ getClasses()

ArrayRef< const Record * > RecordKeeper::getClasses ( ) const

Get all classes, sorted by name.

Definition at line 3210 of file Record.cpp.

References getSortedRecords().

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 2076 of file Record.h.

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

◆ getDefs()

ArrayRef< const Record * > RecordKeeper::getDefs ( ) const

Get all records (defs), sorted by name.

Definition at line 3214 of file Record.cpp.

References getSortedRecords().

Referenced by llvm::operator<<().

◆ getGlobal()

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

Get the Init value of the specified global variable.

Definition at line 2082 of file Record.h.

References getDef().

◆ getGlobals()

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

Get the map of global variables.

Definition at line 2067 of file Record.h.

◆ getImpl()

◆ getInputFilename()

StringRef llvm::RecordKeeper::getInputFilename ( ) const
inline

Get the main TableGen input file's name.

Definition at line 2058 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 3179 of file Record.cpp.

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

◆ getTimer()

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

Definition at line 2117 of file Record.h.

◆ saveInputFilename()

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

Definition at line 2089 of file Record.h.

References Filename.


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