LLVM API Documentation
#include <Record.h>
Public Member Functions | |
RecTy * | getType () const |
virtual Init * | convertInitializerBitRange (const std::vector< unsigned > &Bits) const |
virtual Init * | convertInitListSlice (const std::vector< unsigned > &Elements) const |
virtual RecTy * | getFieldType (const std::string &FieldName) const |
virtual Init * | resolveListElementReference (Record &R, const RecordVal *RV, unsigned Elt) const =0 |
![]() | |
InitKind | getKind () const |
virtual | ~Init () |
virtual bool | isComplete () const |
void | print (raw_ostream &OS) const |
print - Print out this value. More... | |
virtual std::string | getAsString () const =0 |
getAsString - Convert this value to a string form. More... | |
virtual std::string | getAsUnquotedString () const |
void | dump () const |
virtual Init * | convertInitializerTo (RecTy *Ty) const =0 |
virtual Init * | getFieldInit (Record &R, const RecordVal *RV, const std::string &FieldName) const |
virtual Init * | resolveReferences (Record &R, const RecordVal *RV) const |
virtual Init * | getBit (unsigned Bit) const =0 |
virtual Init * | getBitVar () const |
virtual unsigned | getBitNum () const |
Static Public Member Functions | |
static bool | classof (const Init *I) |
Protected Member Functions | |
TypedInit (InitKind K, RecTy *T) | |
![]() | |
Init (InitKind K) | |
Additional Inherited Members | |
![]() | |
enum | InitKind { IK_BitInit, IK_BitsInit, IK_FirstTypedInit, IK_DagInit, IK_DefInit, IK_FieldInit, IK_IntInit, IK_ListInit, IK_FirstOpInit, IK_BinOpInit, IK_TernOpInit, IK_UnOpInit, IK_LastOpInit, IK_StringInit, IK_VarInit, IK_VarListElementInit, IK_LastTypedInit, IK_UnsetInit, IK_VarBitInit } |
Discriminator enum (for isa<>, dyn_cast<>, et al.) More... | |
TypedInit - This is the common super-class of types that have a specific, explicit, type.
Definition at line 566 of file Record.h.
References llvm::Init::getKind(), llvm::Init::IK_FirstTypedInit, and llvm::Init::IK_LastTypedInit.
convertInitializerBitRange - This method is used to implement the bitrange selection operator. Given an initializer, it selects the specified bits out, returning them as a new init of bits type. If it is not legal to use the bit subscript operator on this initializer, return null.
Reimplemented from llvm::Init.
Reimplemented in llvm::IntInit.
Definition at line 1272 of file Record.cpp.
References llvm::dyn_cast(), llvm::BitsInit::get(), llvm::VarBitInit::get(), llvm::BitsRecTy::getNumBits(), and getType().
convertInitListSlice - This method is used to implement the list slice selection operator. Given an initializer, it selects the specified list elements, returning them as a new init of list type. If it is not legal to take a slice of this, return null.
Reimplemented from llvm::Init.
Reimplemented in llvm::ListInit.
Definition at line 1288 of file Record.cpp.
References llvm::dyn_cast(), llvm::ListInit::get(), llvm::VarListElementInit::get(), and getType().
|
virtual |
getFieldType - This method is used to implement the FieldInit class. Implementors of this method should return the type of the named field if they are of record type.
Reimplemented from llvm::Init.
Reimplemented in llvm::DefInit, and llvm::VarInit.
Definition at line 1264 of file Record.cpp.
References llvm::tgtok::Field, and getType().
|
inline |
Definition at line 570 of file Record.h.
Referenced by llvm::UnOpInit::clone(), llvm::BinOpInit::clone(), llvm::TernOpInit::clone(), convertInitializerBitRange(), convertInitListSlice(), llvm::ListInit::convertInitListSlice(), llvm::BitRecTy::convertValue(), llvm::BitsRecTy::convertValue(), llvm::IntRecTy::convertValue(), llvm::StringRecTy::convertValue(), llvm::ListRecTy::convertValue(), llvm::DagRecTy::convertValue(), llvm::RecordRecTy::convertValue(), EvaluateOperation(), llvm::UnOpInit::Fold(), llvm::TernOpInit::Fold(), llvm::RecordRecTy::get(), llvm::UnOpInit::getAsString(), llvm::OpInit::getBit(), llvm::VarInit::getBit(), llvm::VarListElementInit::getBit(), llvm::FieldInit::getBit(), llvm::VarInit::getFieldInit(), getFieldType(), llvm::VarInit::getFieldType(), llvm::ListInit::Profile(), llvm::ListInit::resolveReferences(), llvm::UnOpInit::resolveReferences(), llvm::BinOpInit::resolveReferences(), and llvm::TernOpInit::resolveReferences().
|
pure virtual |
resolveListElementReference - This method is used to implement VarListElementInit::resolveReferences. If the list element is resolvable now, we return the resolved value, otherwise we return null.
Implemented in llvm::DagInit, llvm::FieldInit, llvm::DefInit, llvm::VarListElementInit, llvm::VarInit, llvm::OpInit, llvm::ListInit, llvm::StringInit, and llvm::IntInit.
Referenced by llvm::OpInit::resolveListElementReference(), and llvm::VarListElementInit::resolveListElementReference().