xref: /freebsd/contrib/llvm-project/clang/utils/TableGen/TableGenBackends.h (revision 1ed2ef42e01771f5d8ca9be61e07dcf0fd47feba)
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 EmitAttributeSpellingList(const llvm::RecordKeeper &Records,
55                                llvm::raw_ostream &OS);
56 void EmitClangAttrClass(const llvm::RecordKeeper &Records,
57                         llvm::raw_ostream &OS);
58 void EmitClangAttrImpl(const llvm::RecordKeeper &Records,
59                        llvm::raw_ostream &OS);
60 void EmitClangAttrList(const llvm::RecordKeeper &Records,
61                        llvm::raw_ostream &OS);
62 void EmitClangAttrSubjectMatchRuleList(const llvm::RecordKeeper &Records,
63                                        llvm::raw_ostream &OS);
64 void EmitClangAttrPCHRead(const llvm::RecordKeeper &Records,
65                           llvm::raw_ostream &OS);
66 void EmitClangAttrPCHWrite(const llvm::RecordKeeper &Records,
67                            llvm::raw_ostream &OS);
68 void EmitClangRegularKeywordAttributeInfo(const llvm::RecordKeeper &Records,
69                                           llvm::raw_ostream &OS);
70 void EmitClangAttrHasAttrImpl(const llvm::RecordKeeper &Records,
71                               llvm::raw_ostream &OS);
72 void EmitClangAttrSpellingListIndex(const llvm::RecordKeeper &Records,
73                                     llvm::raw_ostream &OS);
74 void EmitClangAttrASTVisitor(const llvm::RecordKeeper &Records,
75                              llvm::raw_ostream &OS);
76 void EmitClangAttrTemplateInstantiate(const llvm::RecordKeeper &Records,
77                                       llvm::raw_ostream &OS);
78 void EmitClangAttrParsedAttrList(const llvm::RecordKeeper &Records,
79                                  llvm::raw_ostream &OS);
80 void EmitClangAttrParsedAttrImpl(const llvm::RecordKeeper &Records,
81                                  llvm::raw_ostream &OS);
82 void EmitClangAttrParsedAttrKinds(const llvm::RecordKeeper &Records,
83                                   llvm::raw_ostream &OS);
84 void EmitClangAttrTextNodeDump(const llvm::RecordKeeper &Records,
85                                llvm::raw_ostream &OS);
86 void EmitClangAttrNodeTraverse(const llvm::RecordKeeper &Records,
87                                llvm::raw_ostream &OS);
88 void EmitClangAttrDocTable(const llvm::RecordKeeper &Records,
89                            llvm::raw_ostream &OS);
90 
91 void EmitClangBuiltins(const llvm::RecordKeeper &Records,
92                        llvm::raw_ostream &OS);
93 void EmitClangBuiltinTemplates(const llvm::RecordKeeper &Records,
94                                llvm::raw_ostream &OS);
95 
96 void EmitClangDiagsCompatIDs(const llvm::RecordKeeper &Records,
97                              llvm::raw_ostream &OS,
98                              const std::string &Component);
99 void EmitClangDiagsDefs(const llvm::RecordKeeper &Records,
100                         llvm::raw_ostream &OS, const std::string &Component);
101 void EmitClangDiagsEnums(const llvm::RecordKeeper &Records,
102                          llvm::raw_ostream &OS, const std::string &Component);
103 void EmitClangDiagGroups(const llvm::RecordKeeper &Records,
104                          llvm::raw_ostream &OS);
105 void EmitClangDiagsIndexName(const llvm::RecordKeeper &Records,
106                              llvm::raw_ostream &OS);
107 void EmitClangDiagsInterface(llvm::raw_ostream &OS,
108                              const std::string &Component);
109 
110 void EmitClangSACheckers(const llvm::RecordKeeper &Records,
111                          llvm::raw_ostream &OS);
112 
113 void EmitClangCommentHTMLTags(const llvm::RecordKeeper &Records,
114                               llvm::raw_ostream &OS);
115 void EmitClangCommentHTMLTagsProperties(const llvm::RecordKeeper &Records,
116                                         llvm::raw_ostream &OS);
117 void EmitClangCommentHTMLNamedCharacterReferences(
118     const llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
119 
120 void EmitClangCommentCommandInfo(const llvm::RecordKeeper &Records,
121                                  llvm::raw_ostream &OS);
122 void EmitClangCommentCommandList(const llvm::RecordKeeper &Records,
123                                  llvm::raw_ostream &OS);
124 void EmitClangOpcodes(const llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
125 
126 void EmitClangSyntaxNodeList(const llvm::RecordKeeper &Records,
127                              llvm::raw_ostream &OS);
128 void EmitClangSyntaxNodeClasses(const llvm::RecordKeeper &Records,
129                                 llvm::raw_ostream &OS);
130 
131 void EmitNeon(const llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
132 void EmitFP16(const llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
133 void EmitBF16(const llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
134 void EmitNeonSema(const llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
135 void EmitVectorTypes(const llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
136 void EmitNeonTest(const llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
137 
138 void EmitImmCheckTypes(const llvm::RecordKeeper &Records,
139                        llvm::raw_ostream &OS);
140 void EmitSveHeader(const llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
141 void EmitSveBuiltins(const llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
142 void EmitSveBuiltinCG(const llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
143 void EmitSveTypeFlags(const llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
144 void EmitSveRangeChecks(const llvm::RecordKeeper &Records,
145                         llvm::raw_ostream &OS);
146 void EmitSveStreamingAttrs(const llvm::RecordKeeper &Records,
147                            llvm::raw_ostream &OS);
148 
149 void EmitSmeHeader(const llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
150 void EmitSmeBuiltins(const llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
151 void EmitSmeBuiltinCG(const llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
152 void EmitSmeRangeChecks(const llvm::RecordKeeper &Records,
153                         llvm::raw_ostream &OS);
154 void EmitSmeStreamingAttrs(const llvm::RecordKeeper &Records,
155                            llvm::raw_ostream &OS);
156 void EmitSmeBuiltinZAState(const llvm::RecordKeeper &Records,
157                            llvm::raw_ostream &OS);
158 
159 void EmitMveHeader(const llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
160 void EmitMveBuiltinDef(const llvm::RecordKeeper &Records,
161                        llvm::raw_ostream &OS);
162 void EmitMveBuiltinSema(const llvm::RecordKeeper &Records,
163                         llvm::raw_ostream &OS);
164 void EmitMveBuiltinCG(const llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
165 void EmitMveBuiltinAliases(const llvm::RecordKeeper &Records,
166                            llvm::raw_ostream &OS);
167 
168 void EmitRVVHeader(const llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
169 void EmitRVVBuiltins(const llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
170 void EmitRVVBuiltinCG(const llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
171 void EmitRVVBuiltinSema(const llvm::RecordKeeper &Records,
172                         llvm::raw_ostream &OS);
173 
174 void EmitCdeHeader(const llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
175 void EmitCdeBuiltinDef(const llvm::RecordKeeper &Records,
176                        llvm::raw_ostream &OS);
177 void EmitCdeBuiltinSema(const llvm::RecordKeeper &Records,
178                         llvm::raw_ostream &OS);
179 void EmitCdeBuiltinCG(const llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
180 void EmitCdeBuiltinAliases(const llvm::RecordKeeper &Records,
181                            llvm::raw_ostream &OS);
182 
183 void EmitClangAttrDocs(const llvm::RecordKeeper &Records,
184                        llvm::raw_ostream &OS);
185 void EmitClangDiagDocs(const llvm::RecordKeeper &Records,
186                        llvm::raw_ostream &OS);
187 void EmitClangOptDocs(const llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
188 
189 void EmitClangOpenCLBuiltins(const llvm::RecordKeeper &Records,
190                              llvm::raw_ostream &OS);
191 void EmitClangOpenCLBuiltinHeader(const llvm::RecordKeeper &Records,
192                                   llvm::raw_ostream &OS);
193 void EmitClangOpenCLBuiltinTests(const llvm::RecordKeeper &Records,
194                                  llvm::raw_ostream &OS);
195 
196 void EmitClangDataCollectors(const llvm::RecordKeeper &Records,
197                              llvm::raw_ostream &OS);
198 
199 void EmitTestPragmaAttributeSupportedAttributes(
200     const llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
201 
202 } // end namespace clang
203 
204 #endif
205