LLVM 20.0.0git
|
'[classname]' - Type of record values that have zero or more superclasses. More...
#include "llvm/TableGen/Record.h"
Public Types | |
using | const_record_iterator = Record *const * |
Public Types inherited from llvm::RecTy | |
enum | RecTyKind { BitRecTyKind , BitsRecTyKind , IntRecTyKind , StringRecTyKind , ListRecTyKind , DagRecTyKind , RecordRecTyKind } |
Subclass discriminator (for dyn_cast<> et al.) More... | |
Public Member Functions | |
RecordRecTy (const RecordRecTy &)=delete | |
RecordRecTy & | operator= (const RecordRecTy &)=delete |
void | operator delete (void *p) |
void | Profile (FoldingSetNodeID &ID) const |
ArrayRef< Record * > | getClasses () const |
const_record_iterator | classes_begin () const |
const_record_iterator | classes_end () const |
std::string | getAsString () const override |
bool | isSubClassOf (Record *Class) const |
bool | typeIsConvertibleTo (const RecTy *RHS) const override |
Return true if all values of 'this' type can be converted to the specified type. | |
bool | typeIsA (const RecTy *RHS) const override |
Return true if 'this' type is equal to or a subtype of RHS. | |
Public Member Functions inherited from llvm::RecTy | |
RecTy (RecTyKind K, RecordKeeper &RK) | |
virtual | ~RecTy ()=default |
RecTyKind | getRecTyKind () const |
RecordKeeper & | getRecordKeeper () const |
Return the RecordKeeper that uniqued this Type. | |
virtual std::string | getAsString () const =0 |
void | print (raw_ostream &OS) const |
void | dump () const |
virtual bool | typeIsConvertibleTo (const RecTy *RHS) const |
Return true if all values of 'this' type can be converted to the specified type. | |
virtual bool | typeIsA (const RecTy *RHS) const |
Return true if 'this' type is equal to or a subtype of RHS. | |
ListRecTy * | getListTy () |
Returns the type representing list<thistype>. | |
Public Member Functions inherited from llvm::FoldingSetBase::Node | |
Node ()=default | |
void * | getNextInBucket () const |
void | SetNextInBucket (void *N) |
Public Member Functions inherited from llvm::TrailingObjects< RecordRecTy, Record * > | |
const T * | getTrailingObjects () const |
Returns a pointer to the trailing object array of the given type (which must be one of those specified in the class template). | |
T * | getTrailingObjects () |
Returns a pointer to the trailing object array of the given type (which must be one of those specified in the class template). | |
TrailingObjects ()=default | |
TrailingObjects (const TrailingObjects &)=delete | |
TrailingObjects (TrailingObjects &&)=delete | |
TrailingObjects & | operator= (const TrailingObjects &)=delete |
TrailingObjects & | operator= (TrailingObjects &&)=delete |
Static Public Member Functions | |
static bool | classof (const RecTy *RT) |
static RecordRecTy * | get (RecordKeeper &RK, ArrayRef< Record * > Classes) |
Get the record type with the given non-redundant list of superclasses. | |
static RecordRecTy * | get (Record *Class) |
Static Public Member Functions inherited from llvm::TrailingObjects< RecordRecTy, Record * > | |
static constexpr std::enable_if_t< std::is_same_v< Foo< TrailingTys... >, Foo< Tys... > >, size_t > | additionalSizeToAlloc (typename trailing_objects_internal::ExtractSecondType< TrailingTys, size_t >::type... Counts) |
Returns the size of the trailing data, if an object were allocated with the given counts (The counts are in the same order as the template arguments). | |
static constexpr std::enable_if_t< std::is_same_v< Foo< TrailingTys... >, Foo< Tys... > >, size_t > | totalSizeToAlloc (typename trailing_objects_internal::ExtractSecondType< TrailingTys, size_t >::type... Counts) |
Returns the total size of an object if it were allocated with the given trailing object counts. | |
Friends | |
class | Record |
'[classname]' - Type of record values that have zero or more superclasses.
The list of superclasses is non-redundant, i.e. only contains classes that are not the superclass of some other listed class.
using llvm::RecordRecTy::const_record_iterator = Record * const * |
|
delete |
|
inline |
Definition at line 262 of file Record.h.
References getClasses().
|
inline |
Definition at line 263 of file Record.h.
References getClasses().
Definition at line 246 of file Record.h.
References llvm::RecTy::getRecTyKind(), and llvm::RecTy::RecordRecTyKind.
|
static |
Definition at line 244 of file Record.cpp.
|
static |
Get the record type with the given non-redundant list of superclasses.
Definition at line 206 of file Record.cpp.
References llvm::BumpPtrAllocatorImpl< AllocatorT, SlabSize, SizeThreshold, GrowthDelay >::Allocate(), llvm::detail::RecordKeeperImpl::Allocator, llvm::detail::RecordKeeperImpl::AnyRecord, assert(), llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::ArrayRef< T >::empty(), llvm::SmallVectorTemplateCommon< T, typename >::end(), llvm::FoldingSetImpl< Derived, T >::FindNodeOrInsertPos(), llvm::RecordKeeper::getImpl(), llvm::TrailingObjects< BaseTy, TrailingTys >::getTrailingObjects(), llvm::FoldingSetImpl< Derived, T >::InsertNode(), isSubClassOf(), LHS, ProfileRecordRecTy(), llvm::detail::RecordKeeperImpl::RecordTypePool, RHS, llvm::SmallVectorBase< Size_T >::size(), and llvm::sort().
Referenced by get(), llvm::Record::getType(), and resolveRecordTypes().
|
overridevirtual |
Implements llvm::RecTy.
Definition at line 253 of file Record.cpp.
References llvm::First, and getClasses().
Definition at line 256 of file Record.h.
Referenced by classes_begin(), classes_end(), getAsString(), isSubClassOf(), Profile(), and typeIsConvertibleTo().
Definition at line 269 of file Record.cpp.
References llvm::any_of(), getClasses(), and llvm::Record::isSubClassOf().
Referenced by get(), and resolveRecordTypes().
|
delete |
void RecordRecTy::Profile | ( | FoldingSetNodeID & | ID | ) | const |
Definition at line 249 of file Record.cpp.
References getClasses(), and ProfileRecordRecTy().
Return true if 'this' type is equal to or a subtype of RHS.
For example, a bit set is not an int, but they are convertible.
Reimplemented from llvm::RecTy.
Definition at line 289 of file Record.cpp.
References RHS, and typeIsConvertibleTo().
Referenced by llvm::ExistsOpInit::Fold().
Return true if all values of 'this' type can be converted to the specified type.
Reimplemented from llvm::RecTy.
Definition at line 276 of file Record.cpp.
References llvm::all_of(), getClasses(), and RHS.
Referenced by typeIsA().