|
LLVM
10.0.0
|
#include "llvm/TableGen/Record.h"
Public Member Functions | |
| Record (Init *N, ArrayRef< SMLoc > locs, RecordKeeper &records, bool Anonymous=false, bool Class=false) | |
| Record (StringRef N, ArrayRef< SMLoc > locs, RecordKeeper &records, bool Class=false) | |
| Record (const Record &O) | |
| unsigned | getID () const |
| StringRef | getName () const |
| Init * | getNameInit () const |
| const std::string | getNameInitAsString () const |
| void | setName (Init *Name) |
| ArrayRef< SMLoc > | getLoc () const |
| void | appendLoc (SMLoc Loc) |
| RecordRecTy * | getType () |
| DefInit * | getDefInit () |
| get the corresponding DefInit. More... | |
| bool | isClass () const |
| ArrayRef< Init * > | getTemplateArgs () const |
| ArrayRef< RecordVal > | getValues () const |
| ArrayRef< std::pair< Record *, SMRange > > | getSuperClasses () const |
| void | getDirectSuperClasses (SmallVectorImpl< Record *> &Classes) const |
| Append the direct super classes of this record to Classes. More... | |
| bool | isTemplateArg (Init *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 | 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 () |
| If there are any field references that refer to fields that have been filled in, we can propagate the values now. More... | |
| void | resolveReferences (Resolver &R, const RecordVal *SkipVal=nullptr) |
| Apply the resolver to the name of the record as well as to the initializers of all fields of the record except SkipVal. More... | |
| void | resolveReferencesTo (const RecordVal *RV) |
| If anything in this record refers to RV, replace the reference to RV with the RHS of RV. More... | |
| RecordKeeper & | getRecords () const |
| bool | isAnonymous () const |
| void | print (raw_ostream &OS) const |
| void | dump () const |
| Init * | getValueInit (StringRef FieldName) const |
| Return the initializer for a value with the specified name, or throw an exception if the field does not exist. More... | |
| bool | isValueUnset (StringRef FieldName) const |
| Return true if the named field is unset. More... | |
| StringRef | getValueAsString (StringRef FieldName) const |
| 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. More... | |
| BitsInit * | getValueAsBitsInit (StringRef FieldName) const |
| 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. More... | |
| ListInit * | getValueAsListInit (StringRef FieldName) const |
| 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. More... | |
| std::vector< Record * > | getValueAsListOfDefs (StringRef FieldName) const |
| 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. More... | |
| std::vector< int64_t > | getValueAsListOfInts (StringRef FieldName) const |
| 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. More... | |
| std::vector< StringRef > | getValueAsListOfStrings (StringRef FieldName) const |
| 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. More... | |
| Record * | getValueAsDef (StringRef FieldName) const |
| 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. More... | |
| Record * | getValueAsOptionalDef (StringRef FieldName) const |
| This method looks up the specified field and returns its value as a Record, returning null if the field exists but is "uninitialized" (i.e. More... | |
| bool | getValueAsBit (StringRef FieldName) const |
| 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. More... | |
| bool | getValueAsBitOrUnset (StringRef FieldName, bool &Unset) const |
| This method looks up the specified field and returns its value as a bit. More... | |
| int64_t | getValueAsInt (StringRef FieldName) const |
| 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. More... | |
| DagInit * | getValueAsDag (StringRef FieldName) const |
| 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. More... | |
Static Public Member Functions | |
| static unsigned | getNewUID () |
Definition at line 1582 of file Record.h.
References assert(), and llvm::SmallVectorTemplateBase< T >::push_back().
Referenced by QualifiedNameOfImplicitName().
|
inline |
Definition at line 1540 of file Record.h.
References assert(), and llvm::SmallVectorTemplateBase< T >::push_back().
Definition at line 1545 of file Record.h.
References assert(), llvm::RecordVal::getNameInit(), and llvm::SmallVectorTemplateBase< T >::push_back().
Referenced by llvm::VarDefInit::Profile(), and QualifiedNameOfImplicitName().
|
inline |
Definition at line 1493 of file Record.h.
References getType(), and llvm::SmallVectorTemplateBase< T >::push_back().
Referenced by QualifiedNameOfImplicitName().
| LLVM_DUMP_METHOD void Record::dump | ( | ) | const |
Definition at line 2158 of file Record.cpp.
References llvm::errs().
| DefInit * Record::getDefInit | ( | ) |
get the corresponding DefInit.
Definition at line 2084 of file Record.cpp.
References Allocator.
Referenced by llvm::DefInit::get(), and llvm::RecordKeeper::getGlobal().
| void Record::getDirectSuperClasses | ( | SmallVectorImpl< Record *> & | Classes | ) | const |
Append the direct super classes of this record to Classes.
Definition at line 2106 of file Record.cpp.
References llvm::ArrayRef< T >::back(), llvm::ArrayRef< T >::drop_back(), llvm::ArrayRef< T >::empty(), getSuperClasses(), llvm::SmallVectorTemplateBase< T >::push_back(), and llvm::PPCISD::SC.
Referenced by resolveRecordTypes().
|
inline |
Definition at line 1478 of file Record.h.
Referenced by llvm::LessRecordByID::operator()().
Definition at line 1492 of file Record.h.
Referenced by checkConcrete(), llvm::UnOpInit::Fold(), and llvm::FieldInit::Fold().
|
inline |
Definition at line 1480 of file Record.h.
References Name.
Referenced by llvm::LessRecord::operator()(), llvm::LessRecordRegister::operator()(), and QualifiedNameOfImplicitName().
|
inline |
Definition at line 1482 of file Record.h.
References Name.
Referenced by llvm::UnOpInit::Fold(), QualifiedNameOfImplicitName(), and QualifyName().
|
inline |
Definition at line 1486 of file Record.h.
Referenced by checkConcrete(), llvm::RecordRecTy::get(), llvm::operator<<(), and QualifiedNameOfImplicitName().
|
inline |
Definition at line 1607 of file Record.h.
Referenced by llvm::UnOpInit::Fold().
Definition at line 1509 of file Record.h.
Referenced by llvm::SetTheory::expand(), getDirectSuperClasses(), llvm::operator<<(), and QualifiedNameOfImplicitName().
Definition at line 1503 of file Record.h.
Referenced by llvm::operator<<(), and QualifiedNameOfImplicitName().
| RecordRecTy * Record::getType | ( | ) |
Definition at line 2078 of file Record.cpp.
References llvm::RecordRecTy::get().
Referenced by emitNullTerminatedSymbolName(), and llvm::VarListElementInit::getBit().
Definition at line 1522 of file Record.h.
Referenced by checkBitsConcrete(), llvm::FieldInit::Fold(), llvm::operator<<(), and QualifiedNameOfImplicitName().
Definition at line 1528 of file Record.h.
References llvm::StringInit::get().
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.
Definition at line 2331 of file Record.cpp.
References llvm::RecordVal::getName(), llvm::RecordVal::getValue(), and llvm::PrintFatalError().
This method looks up the specified field and returns its value as a bit.
If the field is unset, sets Unset to true and returns false.
Definition at line 2343 of file Record.cpp.
References llvm::RecordVal::getName(), llvm::RecordVal::getValue(), llvm::PrintFatalError(), and llvm::StringRef::str().
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.
Definition at line 2220 of file Record.cpp.
References llvm::RecordVal::getName(), llvm::RecordVal::getValue(), and llvm::PrintFatalError().
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.
Definition at line 2360 of file Record.cpp.
References llvm::RecordVal::getName(), llvm::RecordVal::getValue(), and llvm::PrintFatalError().
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.
Definition at line 2304 of file Record.cpp.
References llvm::RecordVal::getName(), llvm::RecordVal::getValue(), and llvm::PrintFatalError().
| int64_t Record::getValueAsInt | ( | StringRef | FieldName | ) | const |
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.
Definition at line 2258 of file Record.cpp.
References llvm::Init::getAsString(), llvm::RecordVal::getName(), llvm::RecordVal::getValue(), and llvm::PrintFatalError().
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.
Definition at line 2232 of file Record.cpp.
References llvm::RecordVal::getName(), llvm::RecordVal::getValue(), and llvm::PrintFatalError().
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.
Definition at line 2245 of file Record.cpp.
References llvm::RecordVal::getName(), llvm::ListInit::getValues(), I, List, and llvm::PrintFatalError().
| std::vector< int64_t > Record::getValueAsListOfInts | ( | StringRef | FieldName | ) | const |
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.
Definition at line 2273 of file Record.cpp.
References llvm::RecordVal::getName(), llvm::ListInit::getValues(), I, List, and llvm::PrintFatalError().
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.
Definition at line 2289 of file Record.cpp.
References List.
This method looks up the specified field and returns its value as a Record, returning null if the field exists but is "uninitialized" (i.e.
set to ?), and throwing an exception if the field does not exist or if its value is not the right type.
Definition at line 2316 of file Record.cpp.
References llvm::RecordVal::getName(), llvm::RecordVal::getValue(), and llvm::PrintFatalError().
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.
Definition at line 2205 of file Record.cpp.
References llvm::RecordVal::getName(), llvm::RecordVal::getValue(), llvm::PrintFatalError(), and SI.
Referenced by llvm::LessRecordFieldName::operator()().
Return the initializer for a value with the specified name, or throw an exception if the field does not exist.
Definition at line 2197 of file Record.cpp.
References llvm::RecordVal::getName(), llvm::RecordVal::getValue(), and llvm::PrintFatalError().
Definition at line 1507 of file Record.h.
Referenced by checkConcrete(), llvm::operator<<(), and QualifiedNameOfImplicitName().
|
inline |
Definition at line 1611 of file Record.h.
References llvm::RecTy::dump(), and llvm::RecTy::print().
|
inline |
Definition at line 1501 of file Record.h.
Referenced by QualifiedNameOfImplicitName().
Definition at line 1563 of file Record.h.
Referenced by llvm::RecordKeeper::getAllDerivedDefinitions(), llvm::RecordRecTy::isSubClassOf(), and QualifiedNameOfImplicitName().
Definition at line 1516 of file Record.h.
References llvm::X86II::TA.
Referenced by llvm::operator<<().
Return true if the named field is unset.
Definition at line 1627 of file Record.h.
References llvm::operator<<().
| void llvm::Record::print | ( | raw_ostream & | OS | ) | const |
Referenced by llvm::TimerGroup::~TimerGroup().
|
inline |
Definition at line 1550 of file Record.h.
References llvm::SmallVectorTemplateCommon< T >::begin(), llvm::numbers::e, llvm::SmallVectorImpl< T >::erase(), llvm_unreachable, Name, and llvm::SmallVectorBase::size().
Referenced by QualifiedNameOfImplicitName().
|
inline |
Definition at line 1559 of file Record.h.
References llvm::StringInit::get().
| void Record::resolveReferences | ( | ) |
If there are any field references that refer to fields that have been filled in, we can propagate the values now.
This is a final resolve: any error messages, e.g. due to undefined !cast references, are generated now.
Definition at line 2146 of file Record.cpp.
References llvm::Resolver::setFinal().
Referenced by QualifiedNameOfImplicitName().
Apply the resolver to the name of the record as well as to the initializers of all fields of the record except SkipVal.
The resolver should not resolve any of the fields itself, to avoid recursion / infinite loops.
Definition at line 2117 of file Record.cpp.
References llvm::Init::getAsUnquotedString(), llvm::RecordVal::getNameInit(), llvm::Value::getType(), llvm::PrintFatalError(), and llvm::Init::resolveReferences().
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 2152 of file Record.cpp.
| void Record::setName | ( | Init * | Name | ) |
Definition at line 2090 of file Record.cpp.
1.8.13