LLVM API Documentation
#include <Record.h>
Public Member Functions | |
Record (const std::string &N, ArrayRef< SMLoc > locs, RecordKeeper &records, bool Anonymous=false) | |
Record (Init *N, ArrayRef< SMLoc > locs, RecordKeeper &records, bool Anonymous=false) | |
Record (const Record &O) | |
~Record () | |
unsigned | getID () const |
const std::string & | getName () const |
Init * | getNameInit () const |
const std::string | getNameInitAsString () const |
void | setName (Init *Name) |
void | setName (const std::string &Name) |
ArrayRef< SMLoc > | getLoc () const |
DefInit * | getDefInit () |
get the corresponding DefInit. More... | |
const std::vector< Init * > & | getTemplateArgs () const |
const std::vector< RecordVal > & | getValues () const |
const std::vector< Record * > & | getSuperClasses () const |
ArrayRef< SMRange > | getSuperClassRanges () const |
bool | isTemplateArg (Init *Name) const |
bool | isTemplateArg (StringRef Name) const |
const RecordVal * | getValue (const Init *Name) const |
const RecordVal * | getValue (StringRef Name) const |
RecordVal * | getValue (const Init *Name) |
RecordVal * | getValue (StringRef Name) |
void | addTemplateArg (Init *Name) |
void | addTemplateArg (StringRef Name) |
void | addValue (const RecordVal &RV) |
void | removeValue (Init *Name) |
void | removeValue (StringRef Name) |
bool | isSubClassOf (const Record *R) const |
bool | isSubClassOf (StringRef Name) const |
void | addSuperClass (Record *R, SMRange Range) |
void | resolveReferences () |
void | resolveReferencesTo (const RecordVal *RV) |
RecordKeeper & | getRecords () const |
bool | isAnonymous () const |
void | dump () const |
Init * | getValueInit (StringRef FieldName) const |
bool | isValueUnset (StringRef FieldName) const |
Return true if the named field is unset. More... | |
std::string | getValueAsString (StringRef FieldName) const |
BitsInit * | getValueAsBitsInit (StringRef FieldName) const |
ListInit * | getValueAsListInit (StringRef FieldName) const |
std::vector< Record * > | getValueAsListOfDefs (StringRef FieldName) const |
std::vector< int64_t > | getValueAsListOfInts (StringRef FieldName) const |
std::vector< std::string > | getValueAsListOfStrings (StringRef FieldName) const |
Record * | getValueAsDef (StringRef FieldName) const |
bool | getValueAsBit (StringRef FieldName) const |
bool | getValueAsBitOrUnset (StringRef FieldName, bool &Unset) const |
int64_t | getValueAsInt (StringRef FieldName) const |
DagInit * | getValueAsDag (StringRef FieldName) const |
Static Public Member Functions | |
static unsigned | getNewUID () |
|
inlineexplicit |
Definition at line 1527 of file Record.h.
References isSubClassOf().
|
inline |
Definition at line 1480 of file Record.h.
References isTemplateArg().
Referenced by addTemplateArg().
|
inline |
Definition at line 1484 of file Record.h.
References addTemplateArg(), llvm::StringInit::get(), and llvm::StringRef::str().
|
inline |
Definition at line 1488 of file Record.h.
References llvm::RecordVal::getNameInit(), getValue(), and std::swap().
void Record::dump | ( | ) | const |
Definition at line 1745 of file Record.cpp.
References llvm::errs().
Referenced by llvm::MultiClass::dump().
DefInit * Record::getDefInit | ( | ) |
get the corresponding DefInit.
Definition at line 1680 of file Record.cpp.
Referenced by llvm::RecordRecTy::get(), and llvm::DefInit::get().
|
inline |
Definition at line 1429 of file Record.h.
Referenced by llvm::LessRecordByID::operator()().
Definition at line 1442 of file Record.h.
Referenced by llvm::UnOpInit::Fold(), ForeachHelper(), getValueAsBit(), getValueAsBitOrUnset(), getValueAsBitsInit(), getValueAsDag(), getValueAsDef(), getValueAsInt(), getValueAsListInit(), getValueAsListOfDefs(), getValueAsListOfInts(), getValueAsListOfStrings(), getValueAsString(), getValueInit(), and resolveReferencesTo().
const std::string & Record::getName | ( | ) | const |
Definition at line 1686 of file Record.cpp.
References llvm::dyn_cast(), and llvm::StringInit::getValue().
Referenced by llvm::RecordKeeper::addClass(), llvm::RecordKeeper::addDef(), llvm::RecordRecTy::getAsString(), llvm::DefInit::getAsString(), getValueAsBit(), getValueAsBitOrUnset(), getValueAsBitsInit(), getValueAsDag(), getValueAsDef(), getValueAsInt(), getValueAsListInit(), getValueAsListOfDefs(), getValueAsListOfInts(), getValueAsListOfStrings(), getValueAsString(), getValueInit(), llvm::LessRecord::operator()(), and llvm::LessRecordRegister::operator()().
|
inline |
Definition at line 1432 of file Record.h.
Referenced by getNameInitAsString(), getValue(), llvm::QualifyName(), removeValue(), and resolveReferencesTo().
|
inline |
Definition at line 1435 of file Record.h.
References llvm::Init::getAsUnquotedString(), and getNameInit().
Referenced by isSubClassOf(), llvm::operator<<(), and resolveReferencesTo().
|
inline |
Definition at line 1543 of file Record.h.
Referenced by llvm::UnOpInit::Fold().
|
inline |
Definition at line 1451 of file Record.h.
Referenced by llvm::RecordRecTy::baseClassOf(), and llvm::operator<<().
|
inline |
Definition at line 1447 of file Record.h.
Referenced by llvm::operator<<().
Definition at line 1463 of file Record.h.
References getNameInit().
Referenced by addValue(), llvm::UnOpInit::Fold(), llvm::VarInit::getFieldInit(), llvm::DefInit::getFieldInit(), llvm::DefInit::getFieldType(), getValue(), getValueAsBit(), getValueAsBitOrUnset(), getValueAsBitsInit(), getValueAsDag(), getValueAsDef(), getValueAsInt(), getValueAsListInit(), getValueAsString(), getValueInit(), llvm::operator<<(), llvm::VarInit::resolveListElementReference(), llvm::VarInit::resolveReferences(), and resolveReferencesTo().
Definition at line 1468 of file Record.h.
References llvm::StringInit::get(), and getValue().
Definition at line 1471 of file Record.h.
References getNameInit().
Definition at line 1476 of file Record.h.
References llvm::StringInit::get(), and getValue().
getValueAsBit - This method looks up the specified field and returns its value as a bit, throwing an exception if the field does not exist or if the value is not the right type.
getValueAsBit - This method looks up the specified field and returns its value as a bit, aborting if the field does not exist or if the value is not the right type.
Definition at line 1935 of file Record.cpp.
References getLoc(), getName(), llvm::RecordVal::getValue(), getValue(), llvm::PrintFatalError(), and llvm::StringRef::str().
getValueAsBitOrUnset - This method looks up the specified field and returns its value as a bit. If the field is unset, sets Unset to true and retunrs false.
Definition at line 1947 of file Record.cpp.
References llvm::UnsetInit::get(), getLoc(), getName(), llvm::RecordVal::getValue(), getValue(), llvm::PrintFatalError(), and llvm::StringRef::str().
getValueAsBitsInit - This method looks up the specified field and returns its value as a BitsInit, throwing an exception if the field does not exist or if the value is not the right type.
getValueAsBitsInit - This method looks up the specified field and returns its value as a BitsInit, aborts if the field does not exist or if the value is not the right type.
Definition at line 1814 of file Record.cpp.
References getLoc(), getName(), llvm::RecordVal::getValue(), getValue(), llvm::PrintFatalError(), and llvm::StringRef::str().
getValueAsDag - This method looks up the specified field and returns its value as an Dag, throwing an exception if the field does not exist or if the value is not the right type.
getValueAsDag - This method looks up the specified field and returns its value as an Dag, aborting if the field does not exist or if the value is not the right type.
Definition at line 1968 of file Record.cpp.
References getLoc(), getName(), llvm::RecordVal::getValue(), getValue(), llvm::PrintFatalError(), and llvm::StringRef::str().
getValueAsDef - This method looks up the specified field and returns its value as a Record, throwing an exception if the field does not exist or if the value is not the right type.
getValueAsDef - This method looks up the specified field and returns its value as a Record, aborting if the field does not exist or if the value is not the right type.
Definition at line 1919 of file Record.cpp.
References getLoc(), getName(), llvm::RecordVal::getValue(), getValue(), llvm::PrintFatalError(), and llvm::StringRef::str().
int64_t Record::getValueAsInt | ( | StringRef | FieldName | ) | const |
getValueAsInt - This method looks up the specified field and returns its value as an int64_t, throwing an exception if the field does not exist or if the value is not the right type.
getValueAsInt - This method looks up the specified field and returns its value as an int64_t, aborting if the field does not exist or if the value is not the right type.
Definition at line 1865 of file Record.cpp.
References getLoc(), getName(), llvm::RecordVal::getValue(), getValue(), llvm::PrintFatalError(), and llvm::StringRef::str().
getValueAsListInit - This method looks up the specified field and returns its value as a ListInit, throwing an exception if the field does not exist or if the value is not the right type.
getValueAsListInit - This method looks up the specified field and returns its value as a ListInit, aborting if the field does not exist or if the value is not the right type.
Definition at line 1830 of file Record.cpp.
References getLoc(), getName(), llvm::RecordVal::getValue(), getValue(), LI, llvm::PrintFatalError(), and llvm::StringRef::str().
Referenced by getValueAsListOfDefs(), getValueAsListOfInts(), and getValueAsListOfStrings().
getValueAsListOfDefs - This method looks up the specified field and returns its value as a vector of records, throwing an exception if the field does not exist or if the value is not the right type.
getValueAsListOfDefs - This method looks up the specified field and returns its value as a vector of records, aborting if the field does not exist or if the value is not the right type.
Definition at line 1847 of file Record.cpp.
References llvm::ListInit::getElement(), getLoc(), getName(), llvm::ListInit::getSize(), getValueAsListInit(), llvm::tgtok::List, llvm::PrintFatalError(), and llvm::StringRef::str().
std::vector< int64_t > Record::getValueAsListOfInts | ( | StringRef | FieldName | ) | const |
getValueAsListOfInts - This method looks up the specified field and returns its value as a vector of integers, throwing an exception if the field does not exist or if the value is not the right type.
getValueAsListOfInts - This method looks up the specified field and returns its value as a vector of integers, aborting if the field does not exist or if the value is not the right type.
Definition at line 1882 of file Record.cpp.
References llvm::ListInit::getElement(), getLoc(), getName(), llvm::ListInit::getSize(), getValueAsListInit(), llvm::tgtok::List, llvm::PrintFatalError(), and llvm::StringRef::str().
std::vector< std::string > Record::getValueAsListOfStrings | ( | StringRef | FieldName | ) | const |
getValueAsListOfStrings - This method looks up the specified field and returns its value as a vector of strings, throwing an exception if the field does not exist or if the value is not the right type.
getValueAsListOfStrings - This method looks up the specified field and returns its value as a vector of strings, aborting if the field does not exist or if the value is not the right type.
Definition at line 1901 of file Record.cpp.
References llvm::ListInit::getElement(), getLoc(), getName(), llvm::ListInit::getSize(), getValueAsListInit(), llvm::tgtok::List, llvm::PrintFatalError(), and llvm::StringRef::str().
std::string Record::getValueAsString | ( | StringRef | FieldName | ) | const |
getValueAsString - This method looks up the specified field and returns its value as a string, throwing an exception if the field does not exist or if the value is not a string.
getValueAsString - This method looks up the specified field and returns its value as a string, aborts if the field does not exist or if the value is not a string.
Definition at line 1798 of file Record.cpp.
References getLoc(), getName(), llvm::RecordVal::getValue(), getValue(), llvm::PrintFatalError(), and llvm::StringRef::str().
Referenced by llvm::LessRecordFieldName::operator()().
getValueInit - Return the initializer for a value with the specified name, or throw an exception if the field does not exist.
getValueInit - Return the initializer for a value with the specified name, or abort if the field does not exist.
Definition at line 1785 of file Record.cpp.
References getLoc(), getName(), llvm::RecordVal::getValue(), getValue(), llvm::PrintFatalError(), and llvm::StringRef::str().
Referenced by isValueUnset().
|
inline |
Definition at line 1450 of file Record.h.
Referenced by llvm::operator<<().
Definition at line 1513 of file Record.h.
Referenced by addSuperClass(), llvm::RecordRecTy::baseClassOf(), and llvm::RecordRecTy::convertValue().
Definition at line 1520 of file Record.h.
References getNameInitAsString().
Definition at line 1454 of file Record.h.
Referenced by addTemplateArg(), llvm::UnOpInit::Fold(), isTemplateArg(), llvm::operator<<(), and llvm::VarInit::resolveListElementReference().
Definition at line 1459 of file Record.h.
References llvm::StringInit::get(), isTemplateArg(), and llvm::StringRef::str().
Return true if the named field is unset.
Definition at line 1563 of file Record.h.
References llvm::UnsetInit::get(), and getValueInit().
|
inline |
Definition at line 1500 of file Record.h.
References getNameInit(), and llvm_unreachable.
Referenced by removeValue().
|
inline |
Definition at line 1509 of file Record.h.
References llvm::StringInit::get(), removeValue(), and llvm::StringRef::str().
|
inline |
resolveReferences - If there are any field references that refer to fields that have been filled in, we can propagate the values now.
Definition at line 1536 of file Record.h.
References resolveReferencesTo().
void Record::resolveReferencesTo | ( | const RecordVal * | RV | ) |
resolveReferencesTo - If anything in this record refers to RV, replace the reference to RV with the RHS of RV. If RV is null, we resolve all possible references.
Definition at line 1722 of file Record.cpp.
References llvm::Init::getAsUnquotedString(), getLoc(), getNameInit(), llvm::RecordVal::getNameInitAsString(), getNameInitAsString(), llvm::RecordVal::getValue(), getValue(), llvm::PrintFatalError(), llvm::Init::resolveReferences(), and setName().
Referenced by resolveReferences().
void Record::setName | ( | Init * | Name | ) |
Definition at line 1692 of file Record.cpp.
References llvm::RecordKeeper::addClass(), llvm::RecordKeeper::addDef(), llvm::Init::getAsUnquotedString(), llvm::RecordKeeper::getClass(), llvm::RecordKeeper::getDef(), llvm::RecordKeeper::removeClass(), and llvm::RecordKeeper::removeDef().
Referenced by resolveReferencesTo(), and setName().
void Record::setName | ( | const std::string & | Name | ) |
Definition at line 1715 of file Record.cpp.
References llvm::StringInit::get(), and setName().