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
20namespace llvm {
21class raw_ostream;
22class RecordKeeper;
23} // namespace llvm
24
25namespace clang {
26
27void EmitClangDeclContext(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 */
35void EmitClangASTNodes(llvm::RecordKeeper &RK, llvm::raw_ostream &OS,
36 const std::string &N, const std::string &S,
37 std::string_view PriorizeIfSubclassOf = "");
38void EmitClangBasicReader(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
39void EmitClangBasicWriter(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
40void EmitClangTypeNodes(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
41void EmitClangTypeReader(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
42void EmitClangTypeWriter(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
43void EmitClangAttrParserStringSwitches(llvm::RecordKeeper &Records,
44 llvm::raw_ostream &OS);
45void EmitClangAttrSubjectMatchRulesParserStringSwitches(
46 llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
47void EmitClangAttrClass(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
48void EmitClangAttrImpl(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
49void EmitClangAttrList(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
50void EmitClangAttrSubjectMatchRuleList(llvm::RecordKeeper &Records,
51 llvm::raw_ostream &OS);
52void EmitClangAttrPCHRead(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
53void EmitClangAttrPCHWrite(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
54void EmitClangRegularKeywordAttributeInfo(llvm::RecordKeeper &Records,
55 llvm::raw_ostream &OS);
56void EmitClangAttrHasAttrImpl(llvm::RecordKeeper &Records,
57 llvm::raw_ostream &OS);
58void EmitClangAttrSpellingListIndex(llvm::RecordKeeper &Records,
59 llvm::raw_ostream &OS);
60void EmitClangAttrASTVisitor(llvm::RecordKeeper &Records,
61 llvm::raw_ostream &OS);
62void EmitClangAttrTemplateInstantiate(llvm::RecordKeeper &Records,
63 llvm::raw_ostream &OS);
64void EmitClangAttrParsedAttrList(llvm::RecordKeeper &Records,
65 llvm::raw_ostream &OS);
66void EmitClangAttrParsedAttrImpl(llvm::RecordKeeper &Records,
67 llvm::raw_ostream &OS);
68void EmitClangAttrParsedAttrKinds(llvm::RecordKeeper &Records,
69 llvm::raw_ostream &OS);
70void EmitClangAttrTextNodeDump(llvm::RecordKeeper &Records,
71 llvm::raw_ostream &OS);
72void EmitClangAttrNodeTraverse(llvm::RecordKeeper &Records,
73 llvm::raw_ostream &OS);
74void EmitClangAttrDocTable(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
75
76void EmitClangBuiltins(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
77
78void EmitClangDiagsDefs(llvm::RecordKeeper &Records, llvm::raw_ostream &OS,
79 const std::string &Component);
80void EmitClangDiagGroups(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
81void EmitClangDiagsIndexName(llvm::RecordKeeper &Records,
82 llvm::raw_ostream &OS);
83
84void EmitClangSACheckers(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
85
86void EmitClangCommentHTMLTags(llvm::RecordKeeper &Records,
87 llvm::raw_ostream &OS);
88void EmitClangCommentHTMLTagsProperties(llvm::RecordKeeper &Records,
89 llvm::raw_ostream &OS);
90void EmitClangCommentHTMLNamedCharacterReferences(llvm::RecordKeeper &Records,
91 llvm::raw_ostream &OS);
92
93void EmitClangCommentCommandInfo(llvm::RecordKeeper &Records,
94 llvm::raw_ostream &OS);
95void EmitClangCommentCommandList(llvm::RecordKeeper &Records,
96 llvm::raw_ostream &OS);
97void EmitClangOpcodes(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
98
99void EmitClangSyntaxNodeList(llvm::RecordKeeper &Records,
100 llvm::raw_ostream &OS);
101void EmitClangSyntaxNodeClasses(llvm::RecordKeeper &Records,
102 llvm::raw_ostream &OS);
103
104void EmitNeon(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
105void EmitFP16(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
106void EmitBF16(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
107void EmitNeonSema(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
108void EmitVectorTypes(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
109void EmitNeonTest(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
110
111void EmitSveHeader(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
112void EmitSveBuiltins(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
113void EmitSveBuiltinCG(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
114void EmitSveTypeFlags(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
115void EmitSveRangeChecks(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
116void EmitSveStreamingAttrs(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
117
118void EmitSmeHeader(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
119void EmitSmeBuiltins(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
120void EmitSmeBuiltinCG(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
121void EmitSmeRangeChecks(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
122void EmitSmeStreamingAttrs(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
123void EmitSmeBuiltinZAState(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
124
125void EmitMveHeader(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
126void EmitMveBuiltinDef(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
127void EmitMveBuiltinSema(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
128void EmitMveBuiltinCG(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
129void EmitMveBuiltinAliases(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
130
131void EmitRVVHeader(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
132void EmitRVVBuiltins(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
133void EmitRVVBuiltinCG(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
134void EmitRVVBuiltinSema(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
135
136void EmitCdeHeader(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
137void EmitCdeBuiltinDef(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
138void EmitCdeBuiltinSema(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
139void EmitCdeBuiltinCG(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
140void EmitCdeBuiltinAliases(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
141
142void EmitClangAttrDocs(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
143void EmitClangDiagDocs(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
144void EmitClangOptDocs(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
145
146void EmitClangOpenCLBuiltins(llvm::RecordKeeper &Records,
147 llvm::raw_ostream &OS);
148void EmitClangOpenCLBuiltinHeader(llvm::RecordKeeper &Records,
149 llvm::raw_ostream &OS);
150void EmitClangOpenCLBuiltinTests(llvm::RecordKeeper &Records,
151 llvm::raw_ostream &OS);
152
153void EmitClangDataCollectors(llvm::RecordKeeper &Records,
154 llvm::raw_ostream &OS);
155
156void EmitTestPragmaAttributeSupportedAttributes(llvm::RecordKeeper &Records,
157 llvm::raw_ostream &OS);
158
159} // end namespace clang
160
161#endif
162