1 //===- TableGenBackends.h - Declarations for Clang TableGen Backends ------===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 // 9 // This file contains the declarations for all of the Clang TableGen 10 // backends. A "TableGen backend" is just a function. See 11 // "$LLVM_ROOT/utils/TableGen/TableGenBackends.h" for more info. 12 // 13 //===----------------------------------------------------------------------===// 14 15 #ifndef LLVM_CLANG_UTILS_TABLEGEN_TABLEGENBACKENDS_H 16 #define LLVM_CLANG_UTILS_TABLEGEN_TABLEGENBACKENDS_H 17 18 #include <string> 19 20 namespace llvm { 21 class raw_ostream; 22 class RecordKeeper; 23 } // namespace llvm 24 25 namespace clang { 26 27 void EmitClangDeclContext(const llvm::RecordKeeper &RK, llvm::raw_ostream &OS); 28 /** 29 @param PriorizeIfSubclassOf These classes should be prioritized in the output. 30 This is useful to force enum generation/jump tables/lookup tables to be more 31 compact in both size and surrounding code in hot functions. An example use is 32 in Decl for classes that inherit from DeclContext, for functions like 33 castFromDeclContext. 34 */ 35 void EmitClangASTNodes(const llvm::RecordKeeper &RK, llvm::raw_ostream &OS, 36 const std::string &N, const std::string &S, 37 std::string_view PriorizeIfSubclassOf = ""); 38 void EmitClangBasicReader(const llvm::RecordKeeper &Records, 39 llvm::raw_ostream &OS); 40 void EmitClangBasicWriter(const llvm::RecordKeeper &Records, 41 llvm::raw_ostream &OS); 42 void EmitClangTypeNodes(const llvm::RecordKeeper &Records, 43 llvm::raw_ostream &OS); 44 void EmitClangTypeReader(const llvm::RecordKeeper &Records, 45 llvm::raw_ostream &OS); 46 void EmitClangTypeWriter(const llvm::RecordKeeper &Records, 47 llvm::raw_ostream &OS); 48 void EmitClangAttrParserStringSwitches(const llvm::RecordKeeper &Records, 49 llvm::raw_ostream &OS); 50 void EmitClangAttrSubjectMatchRulesParserStringSwitches( 51 const llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 52 void EmitCXX11AttributeInfo(const llvm::RecordKeeper &Records, 53 llvm::raw_ostream &OS); 54 void EmitClangAttrClass(const llvm::RecordKeeper &Records, 55 llvm::raw_ostream &OS); 56 void EmitClangAttrImpl(const llvm::RecordKeeper &Records, 57 llvm::raw_ostream &OS); 58 void EmitClangAttrList(const llvm::RecordKeeper &Records, 59 llvm::raw_ostream &OS); 60 void EmitClangAttrSubjectMatchRuleList(const llvm::RecordKeeper &Records, 61 llvm::raw_ostream &OS); 62 void EmitClangAttrPCHRead(const llvm::RecordKeeper &Records, 63 llvm::raw_ostream &OS); 64 void EmitClangAttrPCHWrite(const llvm::RecordKeeper &Records, 65 llvm::raw_ostream &OS); 66 void EmitClangRegularKeywordAttributeInfo(const llvm::RecordKeeper &Records, 67 llvm::raw_ostream &OS); 68 void EmitClangAttrHasAttrImpl(const llvm::RecordKeeper &Records, 69 llvm::raw_ostream &OS); 70 void EmitClangAttrSpellingListIndex(const llvm::RecordKeeper &Records, 71 llvm::raw_ostream &OS); 72 void EmitClangAttrASTVisitor(const llvm::RecordKeeper &Records, 73 llvm::raw_ostream &OS); 74 void EmitClangAttrTemplateInstantiate(const llvm::RecordKeeper &Records, 75 llvm::raw_ostream &OS); 76 void EmitClangAttrParsedAttrList(const llvm::RecordKeeper &Records, 77 llvm::raw_ostream &OS); 78 void EmitClangAttrParsedAttrImpl(const llvm::RecordKeeper &Records, 79 llvm::raw_ostream &OS); 80 void EmitClangAttrParsedAttrKinds(const llvm::RecordKeeper &Records, 81 llvm::raw_ostream &OS); 82 void EmitClangAttrTextNodeDump(const llvm::RecordKeeper &Records, 83 llvm::raw_ostream &OS); 84 void EmitClangAttrNodeTraverse(const llvm::RecordKeeper &Records, 85 llvm::raw_ostream &OS); 86 void EmitClangAttrDocTable(const llvm::RecordKeeper &Records, 87 llvm::raw_ostream &OS); 88 89 void EmitClangBuiltins(const llvm::RecordKeeper &Records, 90 llvm::raw_ostream &OS); 91 92 void EmitClangDiagsDefs(const llvm::RecordKeeper &Records, 93 llvm::raw_ostream &OS, const std::string &Component); 94 void EmitClangDiagsEnums(const llvm::RecordKeeper &Records, 95 llvm::raw_ostream &OS, const std::string &Component); 96 void EmitClangDiagGroups(const llvm::RecordKeeper &Records, 97 llvm::raw_ostream &OS); 98 void EmitClangDiagsIndexName(const llvm::RecordKeeper &Records, 99 llvm::raw_ostream &OS); 100 101 void EmitClangSACheckers(const llvm::RecordKeeper &Records, 102 llvm::raw_ostream &OS); 103 104 void EmitClangCommentHTMLTags(const llvm::RecordKeeper &Records, 105 llvm::raw_ostream &OS); 106 void EmitClangCommentHTMLTagsProperties(const llvm::RecordKeeper &Records, 107 llvm::raw_ostream &OS); 108 void EmitClangCommentHTMLNamedCharacterReferences( 109 const llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 110 111 void EmitClangCommentCommandInfo(const llvm::RecordKeeper &Records, 112 llvm::raw_ostream &OS); 113 void EmitClangCommentCommandList(const llvm::RecordKeeper &Records, 114 llvm::raw_ostream &OS); 115 void EmitClangOpcodes(const llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 116 117 void EmitClangSyntaxNodeList(const llvm::RecordKeeper &Records, 118 llvm::raw_ostream &OS); 119 void EmitClangSyntaxNodeClasses(const llvm::RecordKeeper &Records, 120 llvm::raw_ostream &OS); 121 122 void EmitNeon(const llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 123 void EmitFP16(const llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 124 void EmitBF16(const llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 125 void EmitNeonSema(const llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 126 void EmitVectorTypes(const llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 127 void EmitNeonTest(const llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 128 129 void EmitImmCheckTypes(const llvm::RecordKeeper &Records, 130 llvm::raw_ostream &OS); 131 void EmitSveHeader(const llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 132 void EmitSveBuiltins(const llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 133 void EmitSveBuiltinCG(const llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 134 void EmitSveTypeFlags(const llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 135 void EmitSveRangeChecks(const llvm::RecordKeeper &Records, 136 llvm::raw_ostream &OS); 137 void EmitSveStreamingAttrs(const llvm::RecordKeeper &Records, 138 llvm::raw_ostream &OS); 139 140 void EmitSmeHeader(const llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 141 void EmitSmeBuiltins(const llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 142 void EmitSmeBuiltinCG(const llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 143 void EmitSmeRangeChecks(const llvm::RecordKeeper &Records, 144 llvm::raw_ostream &OS); 145 void EmitSmeStreamingAttrs(const llvm::RecordKeeper &Records, 146 llvm::raw_ostream &OS); 147 void EmitSmeBuiltinZAState(const llvm::RecordKeeper &Records, 148 llvm::raw_ostream &OS); 149 150 void EmitMveHeader(const llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 151 void EmitMveBuiltinDef(const llvm::RecordKeeper &Records, 152 llvm::raw_ostream &OS); 153 void EmitMveBuiltinSema(const llvm::RecordKeeper &Records, 154 llvm::raw_ostream &OS); 155 void EmitMveBuiltinCG(const llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 156 void EmitMveBuiltinAliases(const llvm::RecordKeeper &Records, 157 llvm::raw_ostream &OS); 158 159 void EmitRVVHeader(const llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 160 void EmitRVVBuiltins(const llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 161 void EmitRVVBuiltinCG(const llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 162 void EmitRVVBuiltinSema(const llvm::RecordKeeper &Records, 163 llvm::raw_ostream &OS); 164 165 void EmitCdeHeader(const llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 166 void EmitCdeBuiltinDef(const llvm::RecordKeeper &Records, 167 llvm::raw_ostream &OS); 168 void EmitCdeBuiltinSema(const llvm::RecordKeeper &Records, 169 llvm::raw_ostream &OS); 170 void EmitCdeBuiltinCG(const llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 171 void EmitCdeBuiltinAliases(const llvm::RecordKeeper &Records, 172 llvm::raw_ostream &OS); 173 174 void EmitClangAttrDocs(const llvm::RecordKeeper &Records, 175 llvm::raw_ostream &OS); 176 void EmitClangDiagDocs(const llvm::RecordKeeper &Records, 177 llvm::raw_ostream &OS); 178 void EmitClangOptDocs(const llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 179 180 void EmitClangOpenCLBuiltins(const llvm::RecordKeeper &Records, 181 llvm::raw_ostream &OS); 182 void EmitClangOpenCLBuiltinHeader(const llvm::RecordKeeper &Records, 183 llvm::raw_ostream &OS); 184 void EmitClangOpenCLBuiltinTests(const llvm::RecordKeeper &Records, 185 llvm::raw_ostream &OS); 186 187 void EmitClangDataCollectors(const llvm::RecordKeeper &Records, 188 llvm::raw_ostream &OS); 189 190 void EmitTestPragmaAttributeSupportedAttributes( 191 const llvm::RecordKeeper &Records, llvm::raw_ostream &OS); 192 193 } // end namespace clang 194 195 #endif 196