Home | History | Annotate | Download | only in TableGen

Lines Matching full:record

20 #include "llvm/TableGen/Record.h"
40 explicit FlattenedSpelling(const Record &Spelling) :
60 GetFlattenedSpellings(const Record &Attr) {
61 std::vector<Record *> Spellings = Attr.getValueAsListOfDefs("Spellings");
80 + std::string(type, 0, type.size()-1) + ">(F, Record[Idx++])")
81 .Case("TypeSourceInfo *", "GetTypeSourceInfo(F, Record, Idx)")
83 .Case("IdentifierInfo *", "GetIdentifierInfo(F, Record, Idx)")
84 .Case("std::string", "ReadString(Record, Idx)")
85 .Default("Record[Idx++]");
92 ", Record);\n")
94 "AddTypeSourceInfo(" + std::string(name) + ", Record);\n")
97 "AddIdentifierRef(" + std::string(name) + ", Record);\n")
98 .Case("std::string", "AddString(" + std::string(name) + ", Record);\n")
99 .Default("Record.push_back(" + std::string(name) + ");\n");
133 typedef std::vector<std::pair<std::string, const Record *>> ParsedAttrMap;
137 std::vector<Record *> Attrs = Records.getAllDerivedDefinitions("Attr");
172 Argument(const Record &Arg, StringRef Attr)
225 SimpleArgument(const Record &Arg, StringRef Attr, std::string T)
304 DefaultSimpleArgument(const Record &Arg, StringRef Attr,
318 StringArgument(const Record &Arg, StringRef Attr)
368 << "= ReadString(Record, Idx);\n";
374 OS << " AddString(SA->get" << getUpperName() << "(), Record);\n";
387 AlignedArgument(const Record &Arg, StringRef Attr)
479 OS << " bool is" << getLowerName() << "Expr = Record[Idx++];\n";
485 << "Ptr = GetTypeSourceInfo(F, Record, Idx);\n";
488 OS << " Record.push_back(SA->is" << getUpperName() << "Expr());\n";
493 << "Type(), Record);\n";
527 VariadicArgument(const Record &Arg, StringRef Attr, std::string T)
582 OS << " unsigned " << getLowerName() << "Size = Record[Idx++];\n";
596 OS << " Record.push_back(SA->" << getLowerName() << "_size());\n";
635 EnumArgument(const Record &Arg, StringRef Attr)
684 << ">(Record[Idx++]));\n";
690 OS << "Record.push_back(SA->get" << getUpperName() << "());\n";
757 VariadicEnumArgument(const Record &Arg, StringRef Attr)
801 OS << " unsigned " << getLowerName() << "Size = Record[Idx++];\n";
808 << QualifiedTypeName << ">(Record[Idx++]));\n";
811 OS << " Record.push_back(SA->" << getLowerName() << "_size());\n";
849 VersionArgument(const Record &Arg, StringRef Attr)
882 << "= ReadVersionTuple(Record, Idx);\n";
888 OS << " AddVersionTuple(SA->get" << getUpperName() << "(), Record);\n";
900 ExprArgument(const Record &Arg, StringRef Attr)
936 VariadicExprArgument(const Record &Arg, StringRef Attr)
995 VariadicStringArgument(const Record &Arg, StringRef Attr)
1005 TypeArgument(const Record &Arg, StringRef Attr)
1028 createArgument(const Record &Arg, StringRef Attr,
1029 const Record *Search = nullptr) {
1075 ArrayRef<Record*> Bases = Search->getSuperClasses();
1100 static void writeGetSpellingFunction(Record &R, raw_ostream &OS) {
1124 writePrettyPrintFunction(Record &R,
1258 static void writeAttrAccessorDefinition(const Record &R, raw_ostream &OS) {
1259 std::vector<Record*> Accessors = R.getValueAsListOfDefs("Accessors");
1354 std::vector<Record*> Attrs = Records.getAllDerivedDefinitions("Attr");
1376 std::vector<Record *> Attrs = Records.getAllDerivedDefinitions("Attr");
1380 std::vector<Record *> Args = Attr->getValueAsListOfDefs("Args");
1404 const Record &Attr = *I.second;
1420 static bool isIdentifierArgument(Record *Arg) {
1432 std::vector<Record*> Attrs = Records.getAllDerivedDefinitions("Attr");
1436 std::vector<Record *> Args = Attr->getValueAsListOfDefs("Args");
1460 std::vector<Record*> Attrs = Records.getAllDerivedDefinitions("Attr");
1463 const Record &R = *Attr;
1479 ArrayRef<Record *> Supers = R.getSuperClasses();
1483 const Record &R = *Super;
1490 std::vector<Record*> ArgRecords = R.getValueAsListOfDefs("Args");
1662 std::vector<Record*> Attrs = Records.getAllDerivedDefinitions("Attr");
1665 Record &R = *Attr;
1670 std::vector<Record*> ArgRecords = R.getValueAsListOfDefs("Args");
1700 const Record &R = *Attr;
1729 const std::vector<Record*> &AttrList) {
1746 static bool AttrHasPragmaSpelling(const Record *R) {
1788 Record *InhClass = Records.getClass("InheritableAttr");
1789 Record *InhParamClass = Records.getClass("InheritableParamAttr");
1790 std::vector<Record *> Attrs = Records.getAllDerivedDefinitions("Attr"),
1825 Record *InhClass = Records.getClass("InheritableAttr");
1826 std::vector<Record*> Attrs = Records.getAllDerivedDefinitions("Attr"),
1834 const Record &R = *Attr;
1840 OS << " bool isInherited = Record[Idx++];\n";
1841 OS << " bool isImplicit = Record[Idx++];\n";
1842 OS << " unsigned Spelling = Record[Idx++];\n";
1868 Record *InhClass = Records.getClass("InheritableAttr");
1869 std::vector<Record*> Attrs = Records.getAllDerivedDefinitions("Attr"), Args;
1876 const Record &R = *Attr;
1885 OS << " Record.push_back(SA->isInherited());\n";
1886 OS << " Record.push_back(A->isImplicit());\n";
1887 OS << " Record.push_back(A->getSpellingListIndex());\n";
1898 // the conditions for a TargetSpecificAttr record, and append the code for
1902 static void GenerateTargetSpecificAttrChecks(const Record *R,
1957 const std::vector<Record *> &Attrs, raw_ostream &OS,
1969 std::vector<Record *> Spellings = Attr->getValueAsListOfDefs("Spellings");
1983 const Record *R = Attr->getValueAsDef("Target");
2012 std::vector<Record *> Attrs = Records.getAllDerivedDefinitions("Attr");
2013 std::vector<Record *> Declspec, GNU, Pragma;
2014 std::map<std::string, std::vector<Record *>> CXX;
2073 const Record &R = *I.second;
2102 std::vector<Record*> Attrs = Records.getAllDerivedDefinitions("Attr");
2109 const Record &R = *Attr;
2123 const Record &R = *Attr;
2135 std::vector<Record*> ArgRecords = R.getValueAsListOfDefs("Args");
2154 const Record &R = *Attr;
2171 std::vector<Record*> Attrs = Records.getAllDerivedDefinitions("Attr");
2183 const Record &R = *Attr;
2206 std::vector<Record*> ArgRecords = R.getValueAsListOfDefs("Args");
2245 static bool isArgVariadic(const Record &R, StringRef AttrName) {
2249 static void emitArgInfo(const Record &R, std::stringstream &OS) {
2253 std::vector<Record *> Args = R.getValueAsListOfDefs("Args");
2274 static std::string CalculateDiagnostic(const Record &S) {
2302 std::vector<Record *> Subjects = S.getValueAsListOfDefs("Subjects");
2304 const Record &R = *Subject;
2324 .Case("Record", GenericRecord)
2390 static std::string GetSubjectWithSuffix(const Record *R) {
2397 static std::string GenerateCustomAppertainsTo(const Record &Subject,
2408 Record *Base = Subject.getValueAsDef("Base");
2429 static std::string GenerateAppertainsTo(const Record &Attr, raw_ostream &OS) {
2435 const Record *SubjectObj = Attr.getValueAsDef("Subjects");
2436 std::vector<Record*> Subjects = SubjectObj->getValueAsListOfDefs("Subjects");
2491 static std::string GenerateLangOptRequirements(const Record &R,
2495 std::vector<Record *> LangOpts = R.getValueAsListOfDefs("LangOpts");
2540 static std::string GenerateTargetRequirements(const Record &Attr,
2549 const Record *R = Attr.getValueAsDef("Target");
2601 static std::string GenerateSpellingIndexToSemanticSpelling(const Record &Attr,
2628 static bool IsKnownToGCC(const Record &Attr) {
2696 std::vector<Record *> Attrs = Records.getAllDerivedDefinitions("Attr");
2700 const Record &Attr = *A;
2783 std::vector<Record*> Attrs = Records.getAllDerivedDefinitions("Attr"), Args;
2785 const Record &R = *Attr;
2825 const Record *Documentation;
2826 const Record *Attribute;
2828 DocumentationData(const Record &Documentation, const Record &Attribute)
2832 static void WriteCategoryHeader(const Record *DocCategory,
2953 const Record &Deprecated = *Doc.Documentation->getValueAsDef("Deprecated");
2970 const Record *Documentation = Records.getDef("GlobalDocumentation");
2981 std::vector<Record *> Attrs = Records.getAllDerivedDefinitions("Attr");
2982 std::map<const Record *, std::vector<DocumentationData>> SplitDocs;
2984 const Record &Attr = *A;
2985 std::vector<Record *> Docs = Attr.getValueAsListOfDefs("Documentation");
2987 const Record &Doc = *D;
2988 const Record *Category = Doc.getValueAsDef("Category");