LLVM 20.0.0git
|
#include "llvm/TableGen/Record.h"
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 |
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. | |
const ListRecTy * | getListTy () const |
Returns the type representing list<thistype>. | |
|
inline |
|
virtualdefault |
LLVM_DUMP_METHOD void RecTy::dump | ( | ) | const |
Definition at line 136 of file Record.cpp.
References llvm::errs(), and print().
|
pure virtual |
Implemented in llvm::BitRecTy, llvm::BitsRecTy, llvm::IntRecTy, llvm::StringRecTy, llvm::ListRecTy, llvm::DagRecTy, and llvm::RecordRecTy.
Referenced by llvm::UnOpInit::Fold(), llvm::ListRecTy::getAsString(), llvm::UnOpInit::getAsString(), llvm::BinOpInit::getAsString(), llvm::IsAOpInit::getAsString(), llvm::ExistsOpInit::getAsString(), and print().
Returns the type representing list<thistype>.
Definition at line 139 of file Record.cpp.
References llvm::detail::RecordKeeperImpl::Allocator, and llvm::RecordKeeper::getImpl().
Referenced by llvm::resolveTypes().
|
inline |
Return the RecordKeeper that uniqued this Type.
Definition at line 88 of file Record.h.
Referenced by llvm::ExistsOpInit::Fold(), llvm::CondOpInit::get(), llvm::ListInit::get(), and llvm::TypedInit::getRecordKeeper().
|
inline |
Definition at line 85 of file Record.h.
Referenced by llvm::BitRecTy::classof(), llvm::BitsRecTy::classof(), llvm::IntRecTy::classof(), llvm::StringRecTy::classof(), llvm::ListRecTy::classof(), llvm::DagRecTy::classof(), and llvm::RecordRecTy::classof().
|
inline |
Definition at line 91 of file Record.h.
References getAsString(), and OS.
Referenced by dump(), and llvm::operator<<().
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 150 of file Record.cpp.
References RHS.
Referenced by llvm::UnOpInit::Fold(), and llvm::ListRecTy::typeIsA().
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 145 of file Record.cpp.
Referenced by llvm::IsAOpInit::Fold(), llvm::resolveTypes(), llvm::BitRecTy::typeIsConvertibleTo(), llvm::BitsRecTy::typeIsConvertibleTo(), and llvm::ListRecTy::typeIsConvertibleTo().