Lines Matching full:record
19 #include "llvm/TableGen/Record.h"
38 explicit FlattenedSpelling(const Record &Spelling) :
56 std::vector<FlattenedSpelling> GetFlattenedSpellings(const Record &Attr) {
57 std::vector<Record *> Spellings = Attr.getValueAsListOfDefs("Spellings");
77 + std::string(type, 0, type.size()-1) + ">(F, Record[Idx++])")
78 .Case("TypeSourceInfo *", "GetTypeSourceInfo(F, Record, Idx)")
80 .Case("IdentifierInfo *", "GetIdentifierInfo(F, Record, Idx)")
81 .Default("Record[Idx++]");
88 ", Record);\n")
90 "AddTypeSourceInfo(" + std::string(name) + ", Record);\n")
93 "AddIdentifierRef(" + std::string(name) + ", Record);\n")
94 .Default("Record.push_back(" + std::string(name) + ");\n");
132 typedef std::vector<std::pair<std::string, const Record *>> ParsedAttrMap;
136 std::vector<Record *> Attrs = Records.getAllDerivedDefinitions("Attr");
170 Argument(const Record &Arg, StringRef Attr)
219 SimpleArgument(const Record &Arg, StringRef Attr, std::string T)
296 DefaultSimpleArgument(const Record &Arg, StringRef Attr,
310 StringArgument(const Record &Arg, StringRef Attr)
358 << "= ReadString(Record, Idx);\n";
364 OS << " AddString(SA->get" << getUpperName() << "(), Record);\n";
377 AlignedArgument(const Record &Arg, StringRef Attr)
470 OS << " bool is" << getLowerName() << "Expr = Record[Idx++];\n";
476 << "Ptr = GetTypeSourceInfo(F, Record, Idx);\n";
479 OS << " Record.push_back(SA->is" << getUpperName() << "Expr());\n";
484 << "Type(), Record);\n";
512 VariadicArgument(const Record &Arg, StringRef Attr, std::string T)
566 OS << " unsigned " << getLowerName() << "Size = Record[Idx++];\n";
580 OS << " Record.push_back(SA->" << getLowerName() << "_size());\n";
619 EnumArgument(const Record &Arg, StringRef Attr)
669 << ">(Record[Idx++]));\n";
675 OS << "Record.push_back(SA->get" << getUpperName() << "());\n";
711 VariadicEnumArgument(const Record &Arg, StringRef Attr)
756 OS << " unsigned " << getLowerName() << "Size = Record[Idx++];\n";
763 << QualifiedTypeName << ">(Record[Idx++]));\n";
766 OS << " Record.push_back(SA->" << getLowerName() << "_size());\n";
791 VersionArgument(const Record &Arg, StringRef Attr)
824 << "= ReadVersionTuple(Record, Idx);\n";
830 OS << " AddVersionTuple(SA->get" << getUpperName() << "(), Record);\n";
842 ExprArgument(const Record &Arg, StringRef Attr)
879 VariadicExprArgument(const Record &Arg, StringRef Attr)
941 TypeArgument(const Record &Arg, StringRef Attr)
964 createArgument(const Record &Arg, StringRef Attr,
965 const Record *Search = nullptr) {
1003 std::vector<Record*> Bases = Search->getSuperClasses();
1026 static void writeGetSpellingFunction(Record &R, raw_ostream &OS) {
1050 writePrettyPrintFunction(Record &R,
1168 static void writeAttrAccessorDefinition(const Record &R, raw_ostream &OS) {
1169 std::vector<Record*> Accessors = R.getValueAsListOfDefs("Accessors");
1260 std::vector<Record*> Attrs = Records.getAllDerivedDefinitions("Attr");
1282 std::vector<Record *> Attrs = Records.getAllDerivedDefinitions("Attr");
1286 std::vector<Record *> Args = Attr->getValueAsListOfDefs("Args");
1310 const Record &Attr = *I.second;
1326 static bool isIdentifierArgument(Record *Arg) {
1337 std::vector<Record*> Attrs = Records.getAllDerivedDefinitions("Attr");
1341 std::vector<Record *> Args = Attr->getValueAsListOfDefs("Args");
1365 std::vector<Record*> Attrs = Records.getAllDerivedDefinitions("Attr");
1368 const Record &R = *Attr;
1384 const std::vector<Record *> Supers = R.getSuperClasses();
1388 const Record &R = *Super;
1395 std::vector<Record*> ArgRecords = R.getValueAsListOfDefs("Args");
1556 std::vector<Record*> Attrs = Records.getAllDerivedDefinitions("Attr");
1559 Record &R = *Attr;
1564 std::vector<Record*> ArgRecords = R.getValueAsListOfDefs("Args");
1593 const std::vector<Record*> &AttrList) {
1594 std::vector<Record*>::const_iterator i = AttrList.begin(), e = AttrList.end();
1636 Record *InhClass = Records.getClass("InheritableAttr");
1637 Record *InhParamClass = Records.getClass("InheritableParamAttr");
1638 std::vector<Record*> Attrs = Records.getAllDerivedDefinitions("Attr"),
1667 Record *InhClass = Records.getClass("InheritableAttr");
1668 std::vector<Record*> Attrs = Records.getAllDerivedDefinitions("Attr"),
1676 const Record &R = *Attr;
1682 OS << " bool isInherited = Record[Idx++];\n";
1683 OS << " bool isImplicit = Record[Idx++];\n";
1684 OS << " unsigned Spelling = Record[Idx++];\n";
1710 Record *InhClass = Records.getClass("InheritableAttr");
1711 std::vector<Record*> Attrs = Records.getAllDerivedDefinitions("Attr"), Args;
1718 const Record &R = *Attr;
1727 OS << " Record.push_back(SA->isInherited());\n";
1728 OS << " Record.push_back(A->isImplicit());\n";
1729 OS << " Record.push_back(A->getSpellingListIndex());\n";
1740 const std::vector<Record *> &Attrs, raw_ostream &OS,
1748 const Record *R = Attr->getValueAsDef("Target");
1799 std::vector<Record *> Attrs = Records.getAllDerivedDefinitions("Attr");
1800 std::vector<Record *> Declspec, GNU, Pragma;
1801 std::map<std::string, std::vector<Record *>> CXX;
1835 for (std::map<std::string, std::vector<Record *>>::iterator I = CXX.begin(),
1864 const Record &R = *I.second;
1893 std::vector<Record*> Attrs = Records.getAllDerivedDefinitions("Attr");
1900 const Record &R = *Attr;
1914 const Record &R = *Attr;
1926 std::vector<Record*> ArgRecords = R.getValueAsListOfDefs("Args");
1945 const Record &R = *Attr;
1962 std::vector<Record*> Attrs = Records.getAllDerivedDefinitions("Attr");
1974 const Record &R = *Attr;
1997 std::vector<Record*> ArgRecords = R.getValueAsListOfDefs("Args");
2036 static void emitArgInfo(const Record &R, std::stringstream &OS) {
2040 std::vector<Record *> Args = R.getValueAsListOfDefs("Args");
2055 static std::string CalculateDiagnostic(const Record &S) {
2082 std::vector<Record *> Subjects = S.getValueAsListOfDefs("Subjects");
2084 const Record &R = *Subject;
2104 .Case("Record", GenericRecord)
2166 static std::string GetSubjectWithSuffix(const Record *R) {
2172 static std::string GenerateCustomAppertainsTo(const Record &Subject,
2183 Record *Base = Subject.getValueAsDef("Base");
2204 static std::string GenerateAppertainsTo(const Record &Attr, raw_ostream &OS) {
2210 const Record *SubjectObj = Attr.getValueAsDef("Subjects");
2211 std::vector<Record*> Subjects = SubjectObj->getValueAsListOfDefs("Subjects");
2266 static std::string GenerateLangOptRequirements(const Record &R,
2270 std::vector<Record *> LangOpts = R.getValueAsListOfDefs("LangOpts");
2313 static std::string GenerateTargetRequirements(const Record &Attr,
2322 const Record *R = Attr.getValueAsDef("Target");
2402 static std::string GenerateSpellingIndexToSemanticSpelling(const Record &Attr,
2429 static bool IsKnownToGCC(const Record &Attr) {
2497 std::vector<Record *> Attrs = Records.getAllDerivedDefinitions("Attr");
2501 const Record &Attr = *A;
2583 std::vector<Record*> Attrs = Records.getAllDerivedDefinitions("Attr"), Args;
2585 const Record &R = *Attr;
2642 const Record *Documentation;
2643 const Record *Attribute;
2645 DocumentationData(const Record &Documentation, const Record &Attribute)
2649 static void WriteCategoryHeader(const Record *DocCategory,
2778 const Record &Deprecated = *Doc.Documentation->getValueAsDef("Deprecated");
2802 const Record *Documentation = Records.getDef("GlobalDocumentation");
2813 std::vector<Record *> Attrs = Records.getAllDerivedDefinitions("Attr");
2814 std::map<const Record *, std::vector<DocumentationData>> SplitDocs;
2816 const Record &Attr = *A;
2817 std::vector<Record *> Docs = Attr.getValueAsListOfDefs("Documentation");
2819 const Record &Doc = *D;
2820 const Record *Category = Doc.getValueAsDef("Category");