LLVM 22.0.0git
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:
[legend]

Public Types

using const_record_iterator = const 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 *Ptr)
void Profile (FoldingSetNodeID &ID) const
ArrayRef< const Record * > getClasses () const
const_record_iterator classes_begin () const
const_record_iterator classes_end () const
std::string getAsString () const override
bool isSubClassOf (const 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.
void print (raw_ostream &OS) const
void dump () const
const ListRecTygetListTy () const
 Returns the type representing list<thistype>.
Public Member Functions inherited from llvm::FoldingSetBase::Node
 Node ()=default
void * getNextInBucket () const
void SetNextInBucket (void *N)

Static Public Member Functions

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

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

Member Typedef Documentation

◆ const_record_iterator

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

References getClasses().

◆ classes_end()

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

Definition at line 268 of file Record.h.

References getClasses().

◆ classof()

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

◆ get() [1/2]

const RecordRecTy * RecordRecTy::get ( const Record * Class)
static

Definition at line 283 of file Record.cpp.

References assert(), get(), and Record.

◆ get() [2/2]

◆ getAsString()

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

Implements llvm::RecTy.

Definition at line 292 of file Record.cpp.

References getClasses(), and Record.

◆ getClasses()

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

◆ isSubClassOf()

bool RecordRecTy::isSubClassOf ( const Record * Class) const

Definition at line 306 of file Record.cpp.

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

Referenced by get().

◆ operator delete()

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

Definition at line 248 of file Record.h.

References Ptr.

◆ operator=()

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

◆ Profile()

void RecordRecTy::Profile ( FoldingSetNodeID & ID) const

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

References llvm::RecTy::RecTy(), 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 312 of file Record.cpp.

References llvm::all_of(), llvm::dyn_cast(), Record, and llvm::RecTy::RecTy().

Referenced by typeIsA().

◆ Record

friend class Record
friend

Definition at line 236 of file Record.h.

References Record.

Referenced by get(), get(), getAsString(), isSubClassOf(), Record, and typeIsConvertibleTo().


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