class Record
Declaration
class Record { /* full declaration omitted */ };
Declared at: llvm/include/llvm/TableGen/Record.h:1543
Member Variables
- private llvm::Init* Name
- private SmallVector<llvm::SMLoc, 4> Locs
- private SmallVector<llvm::SMLoc, 0> ForwardDeclarationLocs
- private SmallVector<llvm::Init*, 0> TemplateArgs
- private SmallVector<llvm::RecordVal, 0> Values
- private SmallVector<llvm::Record::AssertionInfo, 0> Assertions
- private SmallVector<std::pair<Record*, SMRange>, 0> SuperClasses
- private llvm::RecordKeeper& TrackedRecords
- private llvm::DefInit* CorrespondingDefInit = nullptr
- private unsigned int ID
- private bool IsAnonymous
- private bool IsClass
Method Overview
- public Record(llvm::Init * N, ArrayRef<llvm::SMLoc> locs, llvm::RecordKeeper & records, bool Anonymous = false, bool Class = false)
- public Record(llvm::StringRef N, ArrayRef<llvm::SMLoc> locs, llvm::RecordKeeper & records, bool Class = false)
- public Record(const llvm::Record & O)
- public void addAssertion(llvm::SMLoc Loc, llvm::Init * Condition, llvm::Init * Message)
- public void addSuperClass(llvm::Record * R, llvm::SMRange Range)
- public void addTemplateArg(llvm::Init * Name)
- public void addValue(const llvm::RecordVal & RV)
- public void appendAssertions(const llvm::Record * Rec)
- public void appendLoc(llvm::SMLoc Loc)
- private void checkName()
- public void checkRecordAssertions()
- public void checkUnusedTemplateArgs()
- public void dump() const
- public ArrayRef<llvm::Record::AssertionInfo> getAssertions() const
- public llvm::DefInit * getDefInit()
- public void getDirectSuperClasses(SmallVectorImpl<llvm::Record *> & Classes) const
- public llvm::SMLoc getFieldLoc(llvm::StringRef FieldName) const
- public ArrayRef<llvm::SMLoc> getForwardDeclarationLocs() const
- public unsigned int getID() const
- public ArrayRef<llvm::SMLoc> getLoc() const
- public llvm::StringRef getName() const
- public llvm::Init * getNameInit() const
- public std::string getNameInitAsString() const
- public static unsigned int getNewUID(llvm::RecordKeeper & RK)
- public llvm::RecordKeeper & getRecords() const
- public ArrayRef<std::pair<Record *, SMRange>> getSuperClasses() const
- public ArrayRef<llvm::Init *> getTemplateArgs() const
- public llvm::RecordRecTy * getType()
- public const llvm::RecordVal * getValue(const llvm::Init * Name) const
- public const llvm::RecordVal * getValue(llvm::StringRef Name) const
- public llvm::RecordVal * getValue(const llvm::Init * Name)
- public llvm::RecordVal * getValue(llvm::StringRef Name)
- public bool getValueAsBit(llvm::StringRef FieldName) const
- public bool getValueAsBitOrUnset(llvm::StringRef FieldName, bool & Unset) const
- public llvm::BitsInit * getValueAsBitsInit(llvm::StringRef FieldName) const
- public llvm::DagInit * getValueAsDag(llvm::StringRef FieldName) const
- public llvm::Record * getValueAsDef(llvm::StringRef FieldName) const
- public int64_t getValueAsInt(llvm::StringRef FieldName) const
- public llvm::ListInit * getValueAsListInit(llvm::StringRef FieldName) const
- public std::vector<Record *> getValueAsListOfDefs(llvm::StringRef FieldName) const
- public std::vector<int64_t> getValueAsListOfInts(llvm::StringRef FieldName) const
- public std::vector<StringRef> getValueAsListOfStrings(llvm::StringRef FieldName) const
- public llvm::Record * getValueAsOptionalDef(llvm::StringRef FieldName) const
- public llvm::Optional<StringRef> getValueAsOptionalString(llvm::StringRef FieldName) const
- public llvm::StringRef getValueAsString(llvm::StringRef FieldName) const
- public llvm::Init * getValueInit(llvm::StringRef FieldName) const
- public ArrayRef<llvm::RecordVal> getValues() const
- public bool hasDirectSuperClass(const llvm::Record * SuperClass) const
- public bool isAnonymous() const
- public bool isClass() const
- public bool isSubClassOf(llvm::StringRef Name) const
- public bool isSubClassOf(const llvm::Record * R) const
- public bool isTemplateArg(llvm::Init * Name) const
- public bool isValueUnset(llvm::StringRef FieldName) const
- public void removeValue(llvm::Init * Name)
- public void removeValue(llvm::StringRef Name)
- public void resolveReferences(llvm::Resolver & R, const llvm::RecordVal * SkipVal = nullptr)
- public void resolveReferences(llvm::Init * NewName = nullptr)
- public void setName(llvm::Init * Name)
- public void updateClassLoc(llvm::SMLoc Loc)
Methods
¶Record(llvm::Init* N,
ArrayRef<llvm::SMLoc> locs,
llvm::RecordKeeper& records,
bool Anonymous = false,
bool Class = false)
Record(llvm::Init* N,
ArrayRef<llvm::SMLoc> locs,
llvm::RecordKeeper& records,
bool Anonymous = false,
bool Class = false)
Declared at: llvm/include/llvm/TableGen/Record.h:1586
Parameters
- llvm::Init* N
- ArrayRef<llvm::SMLoc> locs
- llvm::RecordKeeper& records
- bool Anonymous = false
- bool Class = false
¶Record(llvm::StringRef N,
ArrayRef<llvm::SMLoc> locs,
llvm::RecordKeeper& records,
bool Class = false)
Record(llvm::StringRef N,
ArrayRef<llvm::SMLoc> locs,
llvm::RecordKeeper& records,
bool Class = false)
Declared at: llvm/include/llvm/TableGen/Record.h:1594
Parameters
- llvm::StringRef N
- ArrayRef<llvm::SMLoc> locs
- llvm::RecordKeeper& records
- bool Class = false
¶Record(const llvm::Record& O)
Record(const llvm::Record& O)
Declared at: llvm/include/llvm/TableGen/Record.h:1601
Parameters
- const llvm::Record& O
¶void addAssertion(llvm::SMLoc Loc,
llvm::Init* Condition,
llvm::Init* Message)
void addAssertion(llvm::SMLoc Loc,
llvm::Init* Condition,
llvm::Init* Message)
Declared at: llvm/include/llvm/TableGen/Record.h:1705
Parameters
- llvm::SMLoc Loc
- llvm::Init* Condition
- llvm::Init* Message
¶void addSuperClass(llvm::Record* R,
llvm::SMRange Range)
void addSuperClass(llvm::Record* R,
llvm::SMRange Range)
Declared at: llvm/include/llvm/TableGen/Record.h:1735
Parameters
- llvm::Record* R
- llvm::SMRange Range
¶void addTemplateArg(llvm::Init* Name)
void addTemplateArg(llvm::Init* Name)
Declared at: llvm/include/llvm/TableGen/Record.h:1682
Parameters
- llvm::Init* Name
¶void addValue(const llvm::RecordVal& RV)
void addValue(const llvm::RecordVal& RV)
Declared at: llvm/include/llvm/TableGen/Record.h:1687
Parameters
- const llvm::RecordVal& RV
¶void appendAssertions(const llvm::Record* Rec)
void appendAssertions(const llvm::Record* Rec)
Declared at: llvm/include/llvm/TableGen/Record.h:1709
Parameters
- const llvm::Record* Rec
¶void appendLoc(llvm::SMLoc Loc)
void appendLoc(llvm::SMLoc Loc)
Declared at: llvm/include/llvm/TableGen/Record.h:1625
Parameters
- llvm::SMLoc Loc
¶void checkName()
void checkName()
Declared at: llvm/include/llvm/TableGen/Record.h:1582
¶void checkRecordAssertions()
void checkRecordAssertions()
Declared at: llvm/include/llvm/TableGen/Record.h:1713
¶void checkUnusedTemplateArgs()
void checkUnusedTemplateArgs()
Declared at: llvm/include/llvm/TableGen/Record.h:1714
¶void dump() const
void dump() const
Declared at: llvm/include/llvm/TableGen/Record.h:1764
¶ArrayRef<llvm::Record::AssertionInfo>
getAssertions() const
ArrayRef<llvm::Record::AssertionInfo>
getAssertions() const
Declared at: llvm/include/llvm/TableGen/Record.h:1648
¶llvm::DefInit* getDefInit()
llvm::DefInit* getDefInit()
Description
get the corresponding DefInit.
Declared at: llvm/include/llvm/TableGen/Record.h:1638
¶void getDirectSuperClasses(
SmallVectorImpl<llvm::Record*>& Classes) const
void getDirectSuperClasses(
SmallVectorImpl<llvm::Record*>& Classes) const
Description
Append the direct superclasses of this record to Classes.
Declared at: llvm/include/llvm/TableGen/Record.h:1658
Parameters
- SmallVectorImpl<llvm::Record*>& Classes
¶llvm::SMLoc getFieldLoc(
llvm::StringRef FieldName) const
llvm::SMLoc getFieldLoc(
llvm::StringRef FieldName) const
Description
Return the source location for the named field.
Declared at: llvm/include/llvm/TableGen/Record.h:1771
Parameters
- llvm::StringRef FieldName
¶ArrayRef<llvm::SMLoc> getForwardDeclarationLocs()
const
ArrayRef<llvm::SMLoc> getForwardDeclarationLocs()
const
Declared at: llvm/include/llvm/TableGen/Record.h:1627
¶unsigned int getID() const
unsigned int getID() const
Declared at: llvm/include/llvm/TableGen/Record.h:1610
¶ArrayRef<llvm::SMLoc> getLoc() const
ArrayRef<llvm::SMLoc> getLoc() const
Declared at: llvm/include/llvm/TableGen/Record.h:1624
¶llvm::StringRef getName() const
llvm::StringRef getName() const
Declared at: llvm/include/llvm/TableGen/Record.h:1612
¶llvm::Init* getNameInit() const
llvm::Init* getNameInit() const
Declared at: llvm/include/llvm/TableGen/Record.h:1614
¶std::string getNameInitAsString() const
std::string getNameInitAsString() const
Declared at: llvm/include/llvm/TableGen/Record.h:1618
¶static unsigned int getNewUID(
llvm::RecordKeeper& RK)
static unsigned int getNewUID(
llvm::RecordKeeper& RK)
Declared at: llvm/include/llvm/TableGen/Record.h:1608
Parameters
¶llvm::RecordKeeper& getRecords() const
llvm::RecordKeeper& getRecords() const
Declared at: llvm/include/llvm/TableGen/Record.h:1756
¶ArrayRef<std::pair<Record*, SMRange>>
getSuperClasses() const
ArrayRef<std::pair<Record*, SMRange>>
getSuperClasses() const
Declared at: llvm/include/llvm/TableGen/Record.h:1650
¶ArrayRef<llvm::Init*> getTemplateArgs() const
ArrayRef<llvm::Init*> getTemplateArgs() const
Declared at: llvm/include/llvm/TableGen/Record.h:1642
¶llvm::RecordRecTy* getType()
llvm::RecordRecTy* getType()
Declared at: llvm/include/llvm/TableGen/Record.h:1635
¶const llvm::RecordVal* getValue(
const llvm::Init* Name) const
const llvm::RecordVal* getValue(
const llvm::Init* Name) const
Declared at: llvm/include/llvm/TableGen/Record.h:1664
Parameters
- const llvm::Init* Name
¶const llvm::RecordVal* getValue(
llvm::StringRef Name) const
const llvm::RecordVal* getValue(
llvm::StringRef Name) const
Declared at: llvm/include/llvm/TableGen/Record.h:1670
Parameters
- llvm::StringRef Name
¶llvm::RecordVal* getValue(const llvm::Init* Name)
llvm::RecordVal* getValue(const llvm::Init* Name)
Declared at: llvm/include/llvm/TableGen/Record.h:1674
Parameters
- const llvm::Init* Name
¶llvm::RecordVal* getValue(llvm::StringRef Name)
llvm::RecordVal* getValue(llvm::StringRef Name)
Declared at: llvm/include/llvm/TableGen/Record.h:1678
Parameters
- llvm::StringRef Name
¶bool getValueAsBit(
llvm::StringRef FieldName) const
bool getValueAsBit(
llvm::StringRef FieldName) const
Description
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.
Declared at: llvm/include/llvm/TableGen/Record.h:1831
Parameters
- llvm::StringRef FieldName
¶bool getValueAsBitOrUnset(
llvm::StringRef FieldName,
bool& Unset) const
bool getValueAsBitOrUnset(
llvm::StringRef FieldName,
bool& Unset) const
Description
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.
Declared at: llvm/include/llvm/TableGen/Record.h:1835
Parameters
- llvm::StringRef FieldName
- bool& Unset
¶llvm::BitsInit* getValueAsBitsInit(
llvm::StringRef FieldName) const
llvm::BitsInit* getValueAsBitsInit(
llvm::StringRef FieldName) const
Description
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.
Declared at: llvm/include/llvm/TableGen/Record.h:1795
Parameters
- llvm::StringRef FieldName
¶llvm::DagInit* getValueAsDag(
llvm::StringRef FieldName) const
llvm::DagInit* getValueAsDag(
llvm::StringRef FieldName) const
Description
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.
Declared at: llvm/include/llvm/TableGen/Record.h:1845
Parameters
- llvm::StringRef FieldName
¶llvm::Record* getValueAsDef(
llvm::StringRef FieldName) const
llvm::Record* getValueAsDef(
llvm::StringRef FieldName) const
Description
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.
Declared at: llvm/include/llvm/TableGen/Record.h:1820
Parameters
- llvm::StringRef FieldName
¶int64_t getValueAsInt(
llvm::StringRef FieldName) const
int64_t getValueAsInt(
llvm::StringRef FieldName) const
Description
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.
Declared at: llvm/include/llvm/TableGen/Record.h:1840
Parameters
- llvm::StringRef FieldName
¶llvm::ListInit* getValueAsListInit(
llvm::StringRef FieldName) const
llvm::ListInit* getValueAsListInit(
llvm::StringRef FieldName) const
Description
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.
Declared at: llvm/include/llvm/TableGen/Record.h:1800
Parameters
- llvm::StringRef FieldName
¶std::vector<Record*> getValueAsListOfDefs(
llvm::StringRef FieldName) const
std::vector<Record*> getValueAsListOfDefs(
llvm::StringRef FieldName) const
Description
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.
Declared at: llvm/include/llvm/TableGen/Record.h:1805
Parameters
- llvm::StringRef FieldName
¶std::vector<int64_t> getValueAsListOfInts(
llvm::StringRef FieldName) const
std::vector<int64_t> getValueAsListOfInts(
llvm::StringRef FieldName) const
Description
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.
Declared at: llvm/include/llvm/TableGen/Record.h:1810
Parameters
- llvm::StringRef FieldName
¶std::vector<StringRef> getValueAsListOfStrings(
llvm::StringRef FieldName) const
std::vector<StringRef> getValueAsListOfStrings(
llvm::StringRef FieldName) const
Description
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.
Declared at: llvm/include/llvm/TableGen/Record.h:1815
Parameters
- llvm::StringRef FieldName
¶llvm::Record* getValueAsOptionalDef(
llvm::StringRef FieldName) const
llvm::Record* getValueAsOptionalDef(
llvm::StringRef FieldName) const
Description
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.
Declared at: llvm/include/llvm/TableGen/Record.h:1826
Parameters
- llvm::StringRef FieldName
¶llvm::Optional<StringRef>
getValueAsOptionalString(
llvm::StringRef FieldName) const
llvm::Optional<StringRef>
getValueAsOptionalString(
llvm::StringRef FieldName) const
Description
This method looks up the specified field and returns its value as a string, throwing an exception if the value is not a string and llvm::Optional() if the field does not exist.
Declared at: llvm/include/llvm/TableGen/Record.h:1790
Parameters
- llvm::StringRef FieldName
¶llvm::StringRef getValueAsString(
llvm::StringRef FieldName) const
llvm::StringRef getValueAsString(
llvm::StringRef FieldName) const
Description
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.
Declared at: llvm/include/llvm/TableGen/Record.h:1785
Parameters
- llvm::StringRef FieldName
¶llvm::Init* getValueInit(
llvm::StringRef FieldName) const
llvm::Init* getValueInit(
llvm::StringRef FieldName) const
Description
Return the initializer for a value with the specified name, or throw an exception if the field does not exist.
Declared at: llvm/include/llvm/TableGen/Record.h:1775
Parameters
- llvm::StringRef FieldName
¶ArrayRef<llvm::RecordVal> getValues() const
ArrayRef<llvm::RecordVal> getValues() const
Declared at: llvm/include/llvm/TableGen/Record.h:1646
¶bool hasDirectSuperClass(
const llvm::Record* SuperClass) const
bool hasDirectSuperClass(
const llvm::Record* SuperClass) const
Description
Determine whether this record has the specified direct superclass.
Declared at: llvm/include/llvm/TableGen/Record.h:1655
Parameters
- const llvm::Record* SuperClass
¶bool isAnonymous() const
bool isAnonymous() const
Declared at: llvm/include/llvm/TableGen/Record.h:1760
¶bool isClass() const
bool isClass() const
Declared at: llvm/include/llvm/TableGen/Record.h:1640
¶bool isSubClassOf(llvm::StringRef Name) const
bool isSubClassOf(llvm::StringRef Name) const
Declared at: llvm/include/llvm/TableGen/Record.h:1723
Parameters
- llvm::StringRef Name
¶bool isSubClassOf(const llvm::Record* R) const
bool isSubClassOf(const llvm::Record* R) const
Declared at: llvm/include/llvm/TableGen/Record.h:1716
Parameters
- const llvm::Record* R
¶bool isTemplateArg(llvm::Init* Name) const
bool isTemplateArg(llvm::Init* Name) const
Declared at: llvm/include/llvm/TableGen/Record.h:1660
Parameters
- llvm::Init* Name
¶bool isValueUnset(llvm::StringRef FieldName) const
bool isValueUnset(llvm::StringRef FieldName) const
Description
Return true if the named field is unset.
Declared at: llvm/include/llvm/TableGen/Record.h:1778
Parameters
- llvm::StringRef FieldName
¶void removeValue(llvm::Init* Name)
void removeValue(llvm::Init* Name)
Declared at: llvm/include/llvm/TableGen/Record.h:1692
Parameters
- llvm::Init* Name
¶void removeValue(llvm::StringRef Name)
void removeValue(llvm::StringRef Name)
Declared at: llvm/include/llvm/TableGen/Record.h:1701
Parameters
- llvm::StringRef Name
¶void resolveReferences(
llvm::Resolver& R,
const llvm::RecordVal* SkipVal = nullptr)
void resolveReferences(
llvm::Resolver& R,
const llvm::RecordVal* SkipVal = nullptr)
Description
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.
Declared at: llvm/include/llvm/TableGen/Record.h:1754
Parameters
- llvm::Resolver& R
- const llvm::RecordVal* SkipVal = nullptr
¶void resolveReferences(
llvm::Init* NewName = nullptr)
void resolveReferences(
llvm::Init* NewName = nullptr)
Description
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.
Declared at: llvm/include/llvm/TableGen/Record.h:1747
Parameters
- llvm::Init* NewName = nullptr
¶void setName(llvm::Init* Name)
void setName(llvm::Init* Name)
Declared at: llvm/include/llvm/TableGen/Record.h:1622
Parameters
- llvm::Init* Name
¶void updateClassLoc(llvm::SMLoc Loc)
void updateClassLoc(llvm::SMLoc Loc)
Declared at: llvm/include/llvm/TableGen/Record.h:1632
Parameters
- llvm::SMLoc Loc