LLVM 22.0.0git
llvm::RecTy Class Referenceabstract

#include "llvm/TableGen/Record.h"

Inheritance diagram for llvm::RecTy:
[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.
const ListRecTygetListTy () const
 Returns the type representing list<thistype>.

Detailed Description

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

Constructor & Destructor Documentation

◆ RecTy()

◆ ~RecTy()

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

Member Function Documentation

◆ dump()

LLVM_DUMP_METHOD void RecTy::dump ( ) const

Definition at line 139 of file Record.cpp.

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

◆ getAsString()

◆ getListTy()

const ListRecTy * RecTy::getListTy ( ) const

Returns the type representing list<thistype>.

Definition at line 142 of file Record.cpp.

Referenced by llvm::resolveTypes().

◆ getRecordKeeper()

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

Return the RecordKeeper that uniqued this Type.

Definition at line 89 of file Record.h.

Referenced by llvm::ListInit::get(), and llvm::ListRecTy::RecTy::getListTy.

◆ getRecTyKind()

◆ print()

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

Definition at line 92 of file Record.h.

References getAsString().

Referenced by dump().

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

References RecTy().

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

Definition at line 148 of file Record.cpp.

References assert(), and RecTy().

Referenced by llvm::BitRecTy::typeIsConvertibleTo(), and llvm::BitsRecTy::typeIsConvertibleTo().


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