LLVM 20.0.0git
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
llvm::RecordRecTy Class Referencefinal

'[classname]' - Type of record values that have zero or more superclasses. More...

#include "llvm/TableGen/Record.h"

Inheritance diagram for llvm::RecordRecTy:
Inheritance graph
[legend]

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
 
RecordRecTyoperator= (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
 
RecordKeepergetRecordKeeper () 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.
 
ListRecTygetListTy ()
 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 TgetTrailingObjects () const
 Returns a pointer to the trailing object array of the given type (which must be one of those specified in the class template).
 
TgetTrailingObjects ()
 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
 
TrailingObjectsoperator= (const TrailingObjects &)=delete
 
TrailingObjectsoperator= (TrailingObjects &&)=delete
 

Static Public Member Functions

static bool classof (const RecTy *RT)
 
static RecordRecTyget (RecordKeeper &RK, ArrayRef< Record * > Classes)
 Get the record type with the given non-redundant list of superclasses.
 
static RecordRecTyget (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
 

Detailed Description

'[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.

Definition at line 229 of file Record.h.

Member Typedef Documentation

◆ const_record_iterator

Definition at line 260 of file Record.h.

Constructor & Destructor Documentation

◆ RecordRecTy()

llvm::RecordRecTy::RecordRecTy ( const RecordRecTy )
delete

Member Function Documentation

◆ classes_begin()

const_record_iterator llvm::RecordRecTy::classes_begin ( ) const
inline

Definition at line 262 of file Record.h.

References getClasses().

◆ classes_end()

const_record_iterator llvm::RecordRecTy::classes_end ( ) const
inline

Definition at line 263 of file Record.h.

References getClasses().

◆ classof()

static bool llvm::RecordRecTy::classof ( const RecTy RT)
inlinestatic

Definition at line 246 of file Record.h.

References llvm::RecTy::getRecTyKind(), and llvm::RecTy::RecordRecTyKind.

◆ get() [1/2]

RecordRecTy * RecordRecTy::get ( Record Class)
static

Definition at line 244 of file Record.cpp.

References assert(), and get().

◆ get() [2/2]

RecordRecTy * RecordRecTy::get ( RecordKeeper RK,
ArrayRef< Record * >  Classes 
)
static

◆ getAsString()

std::string RecordRecTy::getAsString ( ) const
overridevirtual

Implements llvm::RecTy.

Definition at line 253 of file Record.cpp.

References llvm::First, and getClasses().

◆ getClasses()

ArrayRef< Record * > llvm::RecordRecTy::getClasses ( ) const
inline

◆ isSubClassOf()

bool RecordRecTy::isSubClassOf ( Record Class) const

Definition at line 269 of file Record.cpp.

References llvm::any_of(), getClasses(), and llvm::Record::isSubClassOf().

Referenced by get(), and resolveRecordTypes().

◆ operator delete()

void llvm::RecordRecTy::operator delete ( void *  p)
inline

Definition at line 244 of file Record.h.

◆ operator=()

RecordRecTy & llvm::RecordRecTy::operator= ( const RecordRecTy )
delete

◆ Profile()

void RecordRecTy::Profile ( FoldingSetNodeID ID) const

Definition at line 249 of file Record.cpp.

References getClasses(), and ProfileRecordRecTy().

◆ typeIsA()

bool RecordRecTy::typeIsA ( const RecTy RHS) const
overridevirtual

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().

◆ typeIsConvertibleTo()

bool RecordRecTy::typeIsConvertibleTo ( const RecTy RHS) const
overridevirtual

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().

Friends And Related Function Documentation

◆ Record

friend class Record
friend

Definition at line 231 of file Record.h.


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