[LLD][COFF] Emit tail merge pdata for delay load thunks on ARM64EC (#116810)
[llvm-project.git] / clang / utils / TableGen / TableGen.cpp
blob6e2bd0c9f819b88924ac668d7fbce94bfe902f97
1 //===-- TableGen.cpp - Top-Level TableGen implementation for Clang --------===//
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 main function for Clang's TableGen.
11 //===----------------------------------------------------------------------===//
13 #include "ASTTableGen.h"
14 #include "TableGenBackends.h" // Declares all backends.
15 #include "llvm/Support/CommandLine.h"
16 #include "llvm/Support/ManagedStatic.h"
17 #include "llvm/Support/PrettyStackTrace.h"
18 #include "llvm/Support/Signals.h"
19 #include "llvm/TableGen/Main.h"
20 #include "llvm/TableGen/Record.h"
22 using namespace llvm;
23 using namespace clang;
25 enum ActionType {
26 PrintRecords,
27 DumpJSON,
28 GenClangAttrClasses,
29 GenClangAttrParserStringSwitches,
30 GenClangAttrSubjectMatchRulesParserStringSwitches,
31 GenClangAttrImpl,
32 GenClangAttrList,
33 GenClangAttrDocTable,
34 GenClangAttrSubjectMatchRuleList,
35 GenClangAttrPCHRead,
36 GenClangAttrPCHWrite,
37 GenClangRegularKeywordAttributeInfo,
38 GenClangAttrHasAttributeImpl,
39 GenClangAttrSpellingListIndex,
40 GenClangAttrASTVisitor,
41 GenClangAttrTemplateInstantiate,
42 GenClangAttrParsedAttrList,
43 GenClangAttrParsedAttrImpl,
44 GenClangAttrParsedAttrKinds,
45 GenClangAttrTextNodeDump,
46 GenClangAttrNodeTraverse,
47 GenClangBasicReader,
48 GenClangBasicWriter,
49 GenClangBuiltins,
50 GenClangDiagsDefs,
51 GenClangDiagGroups,
52 GenClangDiagsIndexName,
53 GenClangCommentNodes,
54 GenClangDeclNodes,
55 GenClangStmtNodes,
56 GenClangTypeNodes,
57 GenClangTypeReader,
58 GenClangTypeWriter,
59 GenClangOpcodes,
60 GenClangSACheckers,
61 GenClangSyntaxNodeList,
62 GenClangSyntaxNodeClasses,
63 GenClangCommentHTMLTags,
64 GenClangCommentHTMLTagsProperties,
65 GenClangCommentHTMLNamedCharacterReferences,
66 GenClangCommentCommandInfo,
67 GenClangCommentCommandList,
68 GenClangOpenCLBuiltins,
69 GenClangOpenCLBuiltinHeader,
70 GenClangOpenCLBuiltinTests,
71 GenArmNeon,
72 GenArmFP16,
73 GenArmBF16,
74 GenArmVectorType,
75 GenArmNeonSema,
76 GenArmNeonTest,
77 GenArmImmCheckTypes,
78 GenArmMveHeader,
79 GenArmMveBuiltinDef,
80 GenArmMveBuiltinSema,
81 GenArmMveBuiltinCG,
82 GenArmMveBuiltinAliases,
83 GenArmSveHeader,
84 GenArmSveBuiltins,
85 GenArmSveBuiltinCG,
86 GenArmSveTypeFlags,
87 GenArmSveRangeChecks,
88 GenArmSveStreamingAttrs,
89 GenArmSmeHeader,
90 GenArmSmeBuiltins,
91 GenArmSmeBuiltinCG,
92 GenArmSmeRangeChecks,
93 GenArmSmeStreamingAttrs,
94 GenArmSmeBuiltinZAState,
95 GenArmCdeHeader,
96 GenArmCdeBuiltinDef,
97 GenArmCdeBuiltinSema,
98 GenArmCdeBuiltinCG,
99 GenArmCdeBuiltinAliases,
100 GenRISCVVectorHeader,
101 GenRISCVVectorBuiltins,
102 GenRISCVVectorBuiltinCG,
103 GenRISCVVectorBuiltinSema,
104 GenRISCVSiFiveVectorBuiltins,
105 GenRISCVSiFiveVectorBuiltinCG,
106 GenRISCVSiFiveVectorBuiltinSema,
107 GenAttrDocs,
108 GenDiagDocs,
109 GenOptDocs,
110 GenDataCollectors,
111 GenTestPragmaAttributeSupportedAttributes
114 namespace {
115 cl::opt<ActionType> Action(
116 cl::desc("Action to perform:"),
117 cl::values(
118 clEnumValN(PrintRecords, "print-records",
119 "Print all records to stdout (default)"),
120 clEnumValN(DumpJSON, "dump-json",
121 "Dump all records as machine-readable JSON"),
122 clEnumValN(GenClangAttrClasses, "gen-clang-attr-classes",
123 "Generate clang attribute clases"),
124 clEnumValN(GenClangAttrParserStringSwitches,
125 "gen-clang-attr-parser-string-switches",
126 "Generate all parser-related attribute string switches"),
127 clEnumValN(GenClangAttrSubjectMatchRulesParserStringSwitches,
128 "gen-clang-attr-subject-match-rules-parser-string-switches",
129 "Generate all parser-related attribute subject match rule"
130 "string switches"),
131 clEnumValN(GenClangAttrImpl, "gen-clang-attr-impl",
132 "Generate clang attribute implementations"),
133 clEnumValN(GenClangAttrList, "gen-clang-attr-list",
134 "Generate a clang attribute list"),
135 clEnumValN(GenClangAttrDocTable, "gen-clang-attr-doc-table",
136 "Generate a table of attribute documentation"),
137 clEnumValN(GenClangAttrSubjectMatchRuleList,
138 "gen-clang-attr-subject-match-rule-list",
139 "Generate a clang attribute subject match rule list"),
140 clEnumValN(GenClangAttrPCHRead, "gen-clang-attr-pch-read",
141 "Generate clang PCH attribute reader"),
142 clEnumValN(GenClangAttrPCHWrite, "gen-clang-attr-pch-write",
143 "Generate clang PCH attribute writer"),
144 clEnumValN(GenClangRegularKeywordAttributeInfo,
145 "gen-clang-regular-keyword-attr-info",
146 "Generate a list of regular keyword attributes with info "
147 "about their arguments"),
148 clEnumValN(GenClangAttrHasAttributeImpl,
149 "gen-clang-attr-has-attribute-impl",
150 "Generate a clang attribute spelling list"),
151 clEnumValN(GenClangAttrSpellingListIndex,
152 "gen-clang-attr-spelling-index",
153 "Generate a clang attribute spelling index"),
154 clEnumValN(GenClangAttrASTVisitor, "gen-clang-attr-ast-visitor",
155 "Generate a recursive AST visitor for clang attributes"),
156 clEnumValN(GenClangAttrTemplateInstantiate,
157 "gen-clang-attr-template-instantiate",
158 "Generate a clang template instantiate code"),
159 clEnumValN(GenClangAttrParsedAttrList,
160 "gen-clang-attr-parsed-attr-list",
161 "Generate a clang parsed attribute list"),
162 clEnumValN(GenClangAttrParsedAttrImpl,
163 "gen-clang-attr-parsed-attr-impl",
164 "Generate the clang parsed attribute helpers"),
165 clEnumValN(GenClangAttrParsedAttrKinds,
166 "gen-clang-attr-parsed-attr-kinds",
167 "Generate a clang parsed attribute kinds"),
168 clEnumValN(GenClangAttrTextNodeDump, "gen-clang-attr-text-node-dump",
169 "Generate clang attribute text node dumper"),
170 clEnumValN(GenClangAttrNodeTraverse, "gen-clang-attr-node-traverse",
171 "Generate clang attribute traverser"),
172 clEnumValN(GenClangBuiltins, "gen-clang-builtins",
173 "Generate clang builtins list"),
174 clEnumValN(GenClangDiagsDefs, "gen-clang-diags-defs",
175 "Generate Clang diagnostics definitions"),
176 clEnumValN(GenClangDiagGroups, "gen-clang-diag-groups",
177 "Generate Clang diagnostic groups"),
178 clEnumValN(GenClangDiagsIndexName, "gen-clang-diags-index-name",
179 "Generate Clang diagnostic name index"),
180 clEnumValN(GenClangBasicReader, "gen-clang-basic-reader",
181 "Generate Clang BasicReader classes"),
182 clEnumValN(GenClangBasicWriter, "gen-clang-basic-writer",
183 "Generate Clang BasicWriter classes"),
184 clEnumValN(GenClangCommentNodes, "gen-clang-comment-nodes",
185 "Generate Clang AST comment nodes"),
186 clEnumValN(GenClangDeclNodes, "gen-clang-decl-nodes",
187 "Generate Clang AST declaration nodes"),
188 clEnumValN(GenClangStmtNodes, "gen-clang-stmt-nodes",
189 "Generate Clang AST statement nodes"),
190 clEnumValN(GenClangTypeNodes, "gen-clang-type-nodes",
191 "Generate Clang AST type nodes"),
192 clEnumValN(GenClangTypeReader, "gen-clang-type-reader",
193 "Generate Clang AbstractTypeReader class"),
194 clEnumValN(GenClangTypeWriter, "gen-clang-type-writer",
195 "Generate Clang AbstractTypeWriter class"),
196 clEnumValN(GenClangOpcodes, "gen-clang-opcodes",
197 "Generate Clang constexpr interpreter opcodes"),
198 clEnumValN(GenClangSACheckers, "gen-clang-sa-checkers",
199 "Generate Clang Static Analyzer checkers"),
200 clEnumValN(GenClangSyntaxNodeList, "gen-clang-syntax-node-list",
201 "Generate list of Clang Syntax Tree node types"),
202 clEnumValN(GenClangSyntaxNodeClasses, "gen-clang-syntax-node-classes",
203 "Generate definitions of Clang Syntax Tree node clasess"),
204 clEnumValN(GenClangCommentHTMLTags, "gen-clang-comment-html-tags",
205 "Generate efficient matchers for HTML tag "
206 "names that are used in documentation comments"),
207 clEnumValN(GenClangCommentHTMLTagsProperties,
208 "gen-clang-comment-html-tags-properties",
209 "Generate efficient matchers for HTML tag "
210 "properties"),
211 clEnumValN(GenClangCommentHTMLNamedCharacterReferences,
212 "gen-clang-comment-html-named-character-references",
213 "Generate function to translate named character "
214 "references to UTF-8 sequences"),
215 clEnumValN(GenClangCommentCommandInfo, "gen-clang-comment-command-info",
216 "Generate command properties for commands that "
217 "are used in documentation comments"),
218 clEnumValN(GenClangCommentCommandList, "gen-clang-comment-command-list",
219 "Generate list of commands that are used in "
220 "documentation comments"),
221 clEnumValN(GenClangOpenCLBuiltins, "gen-clang-opencl-builtins",
222 "Generate OpenCL builtin declaration handlers"),
223 clEnumValN(GenClangOpenCLBuiltinHeader,
224 "gen-clang-opencl-builtin-header",
225 "Generate OpenCL builtin header"),
226 clEnumValN(GenClangOpenCLBuiltinTests, "gen-clang-opencl-builtin-tests",
227 "Generate OpenCL builtin declaration tests"),
228 clEnumValN(GenArmNeon, "gen-arm-neon", "Generate arm_neon.h for clang"),
229 clEnumValN(GenArmFP16, "gen-arm-fp16", "Generate arm_fp16.h for clang"),
230 clEnumValN(GenArmBF16, "gen-arm-bf16", "Generate arm_bf16.h for clang"),
231 clEnumValN(GenArmVectorType, "gen-arm-vector-type",
232 "Generate arm_vector_types.h for clang"),
233 clEnumValN(GenArmNeonSema, "gen-arm-neon-sema",
234 "Generate ARM NEON sema support for clang"),
235 clEnumValN(GenArmNeonTest, "gen-arm-neon-test",
236 "Generate ARM NEON tests for clang"),
237 clEnumValN(
238 GenArmImmCheckTypes, "gen-arm-immcheck-types",
239 "Generate arm_immcheck_types.inc (immediate range check types)"
240 " for clang"),
241 clEnumValN(GenArmSveHeader, "gen-arm-sve-header",
242 "Generate arm_sve.h for clang"),
243 clEnumValN(GenArmSveBuiltins, "gen-arm-sve-builtins",
244 "Generate arm_sve_builtins.inc for clang"),
245 clEnumValN(GenArmSveBuiltinCG, "gen-arm-sve-builtin-codegen",
246 "Generate arm_sve_builtin_cg_map.inc for clang"),
247 clEnumValN(GenArmSveTypeFlags, "gen-arm-sve-typeflags",
248 "Generate arm_sve_typeflags.inc for clang"),
249 clEnumValN(GenArmSveRangeChecks, "gen-arm-sve-sema-rangechecks",
250 "Generate arm_sve_sema_rangechecks.inc for clang"),
251 clEnumValN(GenArmSveStreamingAttrs, "gen-arm-sve-streaming-attrs",
252 "Generate arm_sve_streaming_attrs.inc for clang"),
253 clEnumValN(GenArmSmeHeader, "gen-arm-sme-header",
254 "Generate arm_sme.h for clang"),
255 clEnumValN(GenArmSmeBuiltins, "gen-arm-sme-builtins",
256 "Generate arm_sme_builtins.inc for clang"),
257 clEnumValN(GenArmSmeBuiltinCG, "gen-arm-sme-builtin-codegen",
258 "Generate arm_sme_builtin_cg_map.inc for clang"),
259 clEnumValN(GenArmSmeRangeChecks, "gen-arm-sme-sema-rangechecks",
260 "Generate arm_sme_sema_rangechecks.inc for clang"),
261 clEnumValN(GenArmSmeStreamingAttrs, "gen-arm-sme-streaming-attrs",
262 "Generate arm_sme_streaming_attrs.inc for clang"),
263 clEnumValN(GenArmSmeBuiltinZAState, "gen-arm-sme-builtin-za-state",
264 "Generate arm_sme_builtins_za_state.inc for clang"),
265 clEnumValN(GenArmMveHeader, "gen-arm-mve-header",
266 "Generate arm_mve.h for clang"),
267 clEnumValN(GenArmMveBuiltinDef, "gen-arm-mve-builtin-def",
268 "Generate ARM MVE builtin definitions for clang"),
269 clEnumValN(GenArmMveBuiltinSema, "gen-arm-mve-builtin-sema",
270 "Generate ARM MVE builtin sema checks for clang"),
271 clEnumValN(GenArmMveBuiltinCG, "gen-arm-mve-builtin-codegen",
272 "Generate ARM MVE builtin code-generator for clang"),
273 clEnumValN(GenArmMveBuiltinAliases, "gen-arm-mve-builtin-aliases",
274 "Generate list of valid ARM MVE builtin aliases for clang"),
275 clEnumValN(GenArmCdeHeader, "gen-arm-cde-header",
276 "Generate arm_cde.h for clang"),
277 clEnumValN(GenArmCdeBuiltinDef, "gen-arm-cde-builtin-def",
278 "Generate ARM CDE builtin definitions for clang"),
279 clEnumValN(GenArmCdeBuiltinSema, "gen-arm-cde-builtin-sema",
280 "Generate ARM CDE builtin sema checks for clang"),
281 clEnumValN(GenArmCdeBuiltinCG, "gen-arm-cde-builtin-codegen",
282 "Generate ARM CDE builtin code-generator for clang"),
283 clEnumValN(GenArmCdeBuiltinAliases, "gen-arm-cde-builtin-aliases",
284 "Generate list of valid ARM CDE builtin aliases for clang"),
285 clEnumValN(GenRISCVVectorHeader, "gen-riscv-vector-header",
286 "Generate riscv_vector.h for clang"),
287 clEnumValN(GenRISCVVectorBuiltins, "gen-riscv-vector-builtins",
288 "Generate riscv_vector_builtins.inc for clang"),
289 clEnumValN(GenRISCVVectorBuiltinCG, "gen-riscv-vector-builtin-codegen",
290 "Generate riscv_vector_builtin_cg.inc for clang"),
291 clEnumValN(GenRISCVVectorBuiltinSema, "gen-riscv-vector-builtin-sema",
292 "Generate riscv_vector_builtin_sema.inc for clang"),
293 clEnumValN(GenRISCVSiFiveVectorBuiltins,
294 "gen-riscv-sifive-vector-builtins",
295 "Generate riscv_sifive_vector_builtins.inc for clang"),
296 clEnumValN(GenRISCVSiFiveVectorBuiltinCG,
297 "gen-riscv-sifive-vector-builtin-codegen",
298 "Generate riscv_sifive_vector_builtin_cg.inc for clang"),
299 clEnumValN(GenRISCVSiFiveVectorBuiltinSema,
300 "gen-riscv-sifive-vector-builtin-sema",
301 "Generate riscv_sifive_vector_builtin_sema.inc for clang"),
302 clEnumValN(GenAttrDocs, "gen-attr-docs",
303 "Generate attribute documentation"),
304 clEnumValN(GenDiagDocs, "gen-diag-docs",
305 "Generate diagnostic documentation"),
306 clEnumValN(GenOptDocs, "gen-opt-docs", "Generate option documentation"),
307 clEnumValN(GenDataCollectors, "gen-clang-data-collectors",
308 "Generate data collectors for AST nodes"),
309 clEnumValN(GenTestPragmaAttributeSupportedAttributes,
310 "gen-clang-test-pragma-attribute-supported-attributes",
311 "Generate a list of attributes supported by #pragma clang "
312 "attribute for testing purposes")));
314 cl::opt<std::string>
315 ClangComponent("clang-component",
316 cl::desc("Only use warnings from specified component"),
317 cl::value_desc("component"), cl::Hidden);
319 bool ClangTableGenMain(raw_ostream &OS, const RecordKeeper &Records) {
320 switch (Action) {
321 case PrintRecords:
322 OS << Records; // No argument, dump all contents
323 break;
324 case DumpJSON:
325 EmitJSON(Records, OS);
326 break;
327 case GenClangAttrClasses:
328 EmitClangAttrClass(Records, OS);
329 break;
330 case GenClangAttrParserStringSwitches:
331 EmitClangAttrParserStringSwitches(Records, OS);
332 break;
333 case GenClangAttrSubjectMatchRulesParserStringSwitches:
334 EmitClangAttrSubjectMatchRulesParserStringSwitches(Records, OS);
335 break;
336 case GenClangAttrImpl:
337 EmitClangAttrImpl(Records, OS);
338 break;
339 case GenClangAttrList:
340 EmitClangAttrList(Records, OS);
341 break;
342 case GenClangAttrDocTable:
343 EmitClangAttrDocTable(Records, OS);
344 break;
345 case GenClangAttrSubjectMatchRuleList:
346 EmitClangAttrSubjectMatchRuleList(Records, OS);
347 break;
348 case GenClangAttrPCHRead:
349 EmitClangAttrPCHRead(Records, OS);
350 break;
351 case GenClangAttrPCHWrite:
352 EmitClangAttrPCHWrite(Records, OS);
353 break;
354 case GenClangRegularKeywordAttributeInfo:
355 EmitClangRegularKeywordAttributeInfo(Records, OS);
356 break;
357 case GenClangAttrHasAttributeImpl:
358 EmitClangAttrHasAttrImpl(Records, OS);
359 break;
360 case GenClangAttrSpellingListIndex:
361 EmitClangAttrSpellingListIndex(Records, OS);
362 break;
363 case GenClangAttrASTVisitor:
364 EmitClangAttrASTVisitor(Records, OS);
365 break;
366 case GenClangAttrTemplateInstantiate:
367 EmitClangAttrTemplateInstantiate(Records, OS);
368 break;
369 case GenClangAttrParsedAttrList:
370 EmitClangAttrParsedAttrList(Records, OS);
371 break;
372 case GenClangAttrParsedAttrImpl:
373 EmitClangAttrParsedAttrImpl(Records, OS);
374 break;
375 case GenClangAttrParsedAttrKinds:
376 EmitClangAttrParsedAttrKinds(Records, OS);
377 break;
378 case GenClangAttrTextNodeDump:
379 EmitClangAttrTextNodeDump(Records, OS);
380 break;
381 case GenClangAttrNodeTraverse:
382 EmitClangAttrNodeTraverse(Records, OS);
383 break;
384 case GenClangBuiltins:
385 EmitClangBuiltins(Records, OS);
386 break;
387 case GenClangDiagsDefs:
388 EmitClangDiagsDefs(Records, OS, ClangComponent);
389 break;
390 case GenClangDiagGroups:
391 EmitClangDiagGroups(Records, OS);
392 break;
393 case GenClangDiagsIndexName:
394 EmitClangDiagsIndexName(Records, OS);
395 break;
396 case GenClangCommentNodes:
397 EmitClangASTNodes(Records, OS, CommentNodeClassName, "");
398 break;
399 case GenClangDeclNodes:
400 EmitClangASTNodes(Records, OS, DeclNodeClassName, "Decl",
401 DeclContextNodeClassName);
402 EmitClangDeclContext(Records, OS);
403 break;
404 case GenClangStmtNodes:
405 EmitClangASTNodes(Records, OS, StmtNodeClassName, "");
406 break;
407 case GenClangTypeNodes:
408 EmitClangTypeNodes(Records, OS);
409 break;
410 case GenClangTypeReader:
411 EmitClangTypeReader(Records, OS);
412 break;
413 case GenClangTypeWriter:
414 EmitClangTypeWriter(Records, OS);
415 break;
416 case GenClangBasicReader:
417 EmitClangBasicReader(Records, OS);
418 break;
419 case GenClangBasicWriter:
420 EmitClangBasicWriter(Records, OS);
421 break;
422 case GenClangOpcodes:
423 EmitClangOpcodes(Records, OS);
424 break;
425 case GenClangSACheckers:
426 EmitClangSACheckers(Records, OS);
427 break;
428 case GenClangCommentHTMLTags:
429 EmitClangCommentHTMLTags(Records, OS);
430 break;
431 case GenClangCommentHTMLTagsProperties:
432 EmitClangCommentHTMLTagsProperties(Records, OS);
433 break;
434 case GenClangCommentHTMLNamedCharacterReferences:
435 EmitClangCommentHTMLNamedCharacterReferences(Records, OS);
436 break;
437 case GenClangCommentCommandInfo:
438 EmitClangCommentCommandInfo(Records, OS);
439 break;
440 case GenClangCommentCommandList:
441 EmitClangCommentCommandList(Records, OS);
442 break;
443 case GenClangOpenCLBuiltins:
444 EmitClangOpenCLBuiltins(Records, OS);
445 break;
446 case GenClangOpenCLBuiltinHeader:
447 EmitClangOpenCLBuiltinHeader(Records, OS);
448 break;
449 case GenClangOpenCLBuiltinTests:
450 EmitClangOpenCLBuiltinTests(Records, OS);
451 break;
452 case GenClangSyntaxNodeList:
453 EmitClangSyntaxNodeList(Records, OS);
454 break;
455 case GenClangSyntaxNodeClasses:
456 EmitClangSyntaxNodeClasses(Records, OS);
457 break;
458 case GenArmNeon:
459 EmitNeon(Records, OS);
460 break;
461 case GenArmFP16:
462 EmitFP16(Records, OS);
463 break;
464 case GenArmVectorType:
465 EmitVectorTypes(Records, OS);
466 break;
467 case GenArmBF16:
468 EmitBF16(Records, OS);
469 break;
470 case GenArmNeonSema:
471 EmitNeonSema(Records, OS);
472 break;
473 case GenArmNeonTest:
474 EmitNeonTest(Records, OS);
475 break;
476 case GenArmImmCheckTypes:
477 EmitImmCheckTypes(Records, OS);
478 break;
479 case GenArmMveHeader:
480 EmitMveHeader(Records, OS);
481 break;
482 case GenArmMveBuiltinDef:
483 EmitMveBuiltinDef(Records, OS);
484 break;
485 case GenArmMveBuiltinSema:
486 EmitMveBuiltinSema(Records, OS);
487 break;
488 case GenArmMveBuiltinCG:
489 EmitMveBuiltinCG(Records, OS);
490 break;
491 case GenArmMveBuiltinAliases:
492 EmitMveBuiltinAliases(Records, OS);
493 break;
494 case GenArmSveHeader:
495 EmitSveHeader(Records, OS);
496 break;
497 case GenArmSveBuiltins:
498 EmitSveBuiltins(Records, OS);
499 break;
500 case GenArmSveBuiltinCG:
501 EmitSveBuiltinCG(Records, OS);
502 break;
503 case GenArmSveTypeFlags:
504 EmitSveTypeFlags(Records, OS);
505 break;
506 case GenArmSveRangeChecks:
507 EmitSveRangeChecks(Records, OS);
508 break;
509 case GenArmSveStreamingAttrs:
510 EmitSveStreamingAttrs(Records, OS);
511 break;
512 case GenArmSmeHeader:
513 EmitSmeHeader(Records, OS);
514 break;
515 case GenArmSmeBuiltins:
516 EmitSmeBuiltins(Records, OS);
517 break;
518 case GenArmSmeBuiltinCG:
519 EmitSmeBuiltinCG(Records, OS);
520 break;
521 case GenArmSmeRangeChecks:
522 EmitSmeRangeChecks(Records, OS);
523 break;
524 case GenArmSmeStreamingAttrs:
525 EmitSmeStreamingAttrs(Records, OS);
526 break;
527 case GenArmSmeBuiltinZAState:
528 EmitSmeBuiltinZAState(Records, OS);
529 break;
530 case GenArmCdeHeader:
531 EmitCdeHeader(Records, OS);
532 break;
533 case GenArmCdeBuiltinDef:
534 EmitCdeBuiltinDef(Records, OS);
535 break;
536 case GenArmCdeBuiltinSema:
537 EmitCdeBuiltinSema(Records, OS);
538 break;
539 case GenArmCdeBuiltinCG:
540 EmitCdeBuiltinCG(Records, OS);
541 break;
542 case GenArmCdeBuiltinAliases:
543 EmitCdeBuiltinAliases(Records, OS);
544 break;
545 case GenRISCVVectorHeader:
546 EmitRVVHeader(Records, OS);
547 break;
548 case GenRISCVVectorBuiltins:
549 EmitRVVBuiltins(Records, OS);
550 break;
551 case GenRISCVVectorBuiltinCG:
552 EmitRVVBuiltinCG(Records, OS);
553 break;
554 case GenRISCVVectorBuiltinSema:
555 EmitRVVBuiltinSema(Records, OS);
556 break;
557 case GenRISCVSiFiveVectorBuiltins:
558 EmitRVVBuiltins(Records, OS);
559 break;
560 case GenRISCVSiFiveVectorBuiltinCG:
561 EmitRVVBuiltinCG(Records, OS);
562 break;
563 case GenRISCVSiFiveVectorBuiltinSema:
564 EmitRVVBuiltinSema(Records, OS);
565 break;
566 case GenAttrDocs:
567 EmitClangAttrDocs(Records, OS);
568 break;
569 case GenDiagDocs:
570 EmitClangDiagDocs(Records, OS);
571 break;
572 case GenOptDocs:
573 EmitClangOptDocs(Records, OS);
574 break;
575 case GenDataCollectors:
576 EmitClangDataCollectors(Records, OS);
577 break;
578 case GenTestPragmaAttributeSupportedAttributes:
579 EmitTestPragmaAttributeSupportedAttributes(Records, OS);
580 break;
583 return false;
587 int main(int argc, char **argv) {
588 sys::PrintStackTraceOnErrorSignal(argv[0]);
589 PrettyStackTraceProgram X(argc, argv);
590 cl::ParseCommandLineOptions(argc, argv);
592 llvm_shutdown_obj Y;
594 return TableGenMain(argv[0], &ClangTableGenMain);
597 #ifdef __has_feature
598 #if __has_feature(address_sanitizer)
599 #include <sanitizer/lsan_interface.h>
600 // Disable LeakSanitizer for this binary as it has too many leaks that are not
601 // very interesting to fix. See compiler-rt/include/sanitizer/lsan_interface.h .
602 int __lsan_is_turned_off() { return 1; }
603 #endif // __has_feature(address_sanitizer)
604 #endif // defined(__has_feature)