LLVM 19.0.0git
Public Types | Public Member Functions | List of all members
llvm::RecTy Class Referenceabstract

#include "llvm/TableGen/Record.h"

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

Public Types

enum  RecTyKind {
  BitRecTyKind , BitsRecTyKind , IntRecTyKind , StringRecTyKind ,
  ListRecTyKind , DagRecTyKind , RecordRecTyKind
}
 Subclass discriminator (for dyn_cast<> et al.) More...
 

Public Member Functions

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

Detailed Description

Definition at line 59 of file Record.h.

Member Enumeration Documentation

◆ RecTyKind

Subclass discriminator (for dyn_cast<> et al.)

Enumerator
BitRecTyKind 
BitsRecTyKind 
IntRecTyKind 
StringRecTyKind 
ListRecTyKind 
DagRecTyKind 
RecordRecTyKind 

Definition at line 62 of file Record.h.

Constructor & Destructor Documentation

◆ RecTy()

llvm::RecTy::RecTy ( RecTyKind  K,
RecordKeeper RK 
)
inline

Definition at line 80 of file Record.h.

◆ ~RecTy()

virtual llvm::RecTy::~RecTy ( )
virtualdefault

Member Function Documentation

◆ dump()

LLVM_DUMP_METHOD void RecTy::dump ( ) const

Definition at line 104 of file Record.cpp.

References llvm::errs(), and print().

◆ getAsString()

virtual std::string llvm::RecTy::getAsString ( ) const
pure virtual

◆ getListTy()

ListRecTy * RecTy::getListTy ( )

Returns the type representing list<thistype>.

Definition at line 107 of file Record.cpp.

References llvm::detail::RecordKeeperImpl::Allocator, and llvm::RecordKeeper::getImpl().

Referenced by llvm::resolveTypes().

◆ getRecordKeeper()

RecordKeeper & llvm::RecTy::getRecordKeeper ( ) const
inline

Return the RecordKeeper that uniqued this Type.

Definition at line 86 of file Record.h.

Referenced by llvm::ExistsOpInit::Fold(), llvm::CondOpInit::get(), llvm::ListInit::get(), and llvm::TypedInit::getRecordKeeper().

◆ getRecTyKind()

RecTyKind llvm::RecTy::getRecTyKind ( ) const
inline

◆ print()

void llvm::RecTy::print ( raw_ostream OS) const
inline

Definition at line 89 of file Record.h.

References getAsString(), and OS.

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

◆ typeIsA()

bool RecTy::typeIsA ( const RecTy RHS) const
virtual

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 in llvm::ListRecTy, and llvm::RecordRecTy.

Definition at line 118 of file Record.cpp.

References RHS.

Referenced by llvm::UnOpInit::Fold(), and llvm::ListRecTy::typeIsA().

◆ typeIsConvertibleTo()

bool RecTy::typeIsConvertibleTo ( const RecTy RHS) const
virtual

Return true if all values of 'this' type can be converted to the specified type.

Reimplemented in llvm::BitRecTy, llvm::BitsRecTy, llvm::IntRecTy, llvm::StringRecTy, llvm::ListRecTy, and llvm::RecordRecTy.

Definition at line 113 of file Record.cpp.

References assert(), and RHS.

Referenced by llvm::IsAOpInit::Fold(), llvm::resolveTypes(), llvm::BitRecTy::typeIsConvertibleTo(), llvm::BitsRecTy::typeIsConvertibleTo(), and llvm::ListRecTy::typeIsConvertibleTo().


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