Coverage Report

Created: 2021-08-24 07:12

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