Subversion Repositories QNX 8.QNX8 LLVM/Clang compiler suite

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
14 pmbaty 1
/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
2
|*                                                                            *|
3
|* Attribute text node dumper                                                 *|
4
|*                                                                            *|
5
|* Automatically generated file, do not edit!                                 *|
6
|*                                                                            *|
7
\*===----------------------------------------------------------------------===*/
8
 
9
  void VisitAMDGPUNumSGPRAttr(const AMDGPUNumSGPRAttr *A) {
10
    const auto *SA = cast<AMDGPUNumSGPRAttr>(A); (void)SA;
11
    OS << " " << SA->getNumSGPR();
12
  }
13
  void VisitAMDGPUNumVGPRAttr(const AMDGPUNumVGPRAttr *A) {
14
    const auto *SA = cast<AMDGPUNumVGPRAttr>(A); (void)SA;
15
    OS << " " << SA->getNumVGPR();
16
  }
17
  void VisitARMInterruptAttr(const ARMInterruptAttr *A) {
18
    const auto *SA = cast<ARMInterruptAttr>(A); (void)SA;
19
    switch(SA->getInterrupt()) {
20
    case ARMInterruptAttr::IRQ:
21
      OS << " IRQ";
22
      break;
23
    case ARMInterruptAttr::FIQ:
24
      OS << " FIQ";
25
      break;
26
    case ARMInterruptAttr::SWI:
27
      OS << " SWI";
28
      break;
29
    case ARMInterruptAttr::ABORT:
30
      OS << " ABORT";
31
      break;
32
    case ARMInterruptAttr::UNDEF:
33
      OS << " UNDEF";
34
      break;
35
    case ARMInterruptAttr::Generic:
36
      OS << " Generic";
37
      break;
38
    }
39
  }
40
  void VisitAbiTagAttr(const AbiTagAttr *A) {
41
    const auto *SA = cast<AbiTagAttr>(A); (void)SA;
42
    for (const auto &Val : SA->tags())
43
      OS << " " << Val;
44
  }
45
  void VisitAcquireCapabilityAttr(const AcquireCapabilityAttr *A) {
46
    const auto *SA = cast<AcquireCapabilityAttr>(A); (void)SA;
47
    OS << " " << A->getSpelling();
48
  }
49
  void VisitAcquireHandleAttr(const AcquireHandleAttr *A) {
50
    const auto *SA = cast<AcquireHandleAttr>(A); (void)SA;
51
    OS << " \"" << SA->getHandleType() << "\"";
52
  }
53
  void VisitAddressSpaceAttr(const AddressSpaceAttr *A) {
54
    const auto *SA = cast<AddressSpaceAttr>(A); (void)SA;
55
    OS << " " << SA->getAddressSpace();
56
  }
57
  void VisitAliasAttr(const AliasAttr *A) {
58
    const auto *SA = cast<AliasAttr>(A); (void)SA;
59
    OS << " \"" << SA->getAliasee() << "\"";
60
  }
61
  void VisitAlignedAttr(const AlignedAttr *A) {
62
    const auto *SA = cast<AlignedAttr>(A); (void)SA;
63
    OS << " " << A->getSpelling();
64
    if (!SA->isAlignmentExpr())
65
      dumpType(SA->getAlignmentType()->getType());
66
  }
67
  void VisitAllocAlignAttr(const AllocAlignAttr *A) {
68
    const auto *SA = cast<AllocAlignAttr>(A); (void)SA;
69
    OS << " " << SA->getParamIndex().getSourceIndex();
70
  }
71
  void VisitAllocSizeAttr(const AllocSizeAttr *A) {
72
    const auto *SA = cast<AllocSizeAttr>(A); (void)SA;
73
    OS << " " << SA->getElemSizeParam().getSourceIndex();
74
    if (SA->getNumElemsParam().isValid())
75
      OS << " " << SA->getNumElemsParam().getSourceIndex();
76
  }
77
  void VisitAlwaysInlineAttr(const AlwaysInlineAttr *A) {
78
    OS << " " << A->getSpelling();
79
  }
80
  void VisitAnnotateAttr(const AnnotateAttr *A) {
81
    const auto *SA = cast<AnnotateAttr>(A); (void)SA;
82
    OS << " \"" << SA->getAnnotation() << "\"";
83
  }
84
  void VisitAnnotateTypeAttr(const AnnotateTypeAttr *A) {
85
    const auto *SA = cast<AnnotateTypeAttr>(A); (void)SA;
86
    OS << " \"" << SA->getAnnotation() << "\"";
87
  }
88
  void VisitArgumentWithTypeTagAttr(const ArgumentWithTypeTagAttr *A) {
89
    const auto *SA = cast<ArgumentWithTypeTagAttr>(A); (void)SA;
90
    OS << " " << A->getSpelling();
91
    if (SA->getArgumentKind())
92
      OS << " " << SA->getArgumentKind()->getName();
93
    OS << " " << SA->getArgumentIdx().getSourceIndex();
94
    OS << " " << SA->getTypeTagIdx().getSourceIndex();
95
    if (SA->getIsPointer()) OS << " IsPointer";
96
  }
97
  void VisitArmBuiltinAliasAttr(const ArmBuiltinAliasAttr *A) {
98
    const auto *SA = cast<ArmBuiltinAliasAttr>(A); (void)SA;
99
    if (SA->getBuiltinName())
100
      OS << " " << SA->getBuiltinName()->getName();
101
  }
102
  void VisitAsmLabelAttr(const AsmLabelAttr *A) {
103
    const auto *SA = cast<AsmLabelAttr>(A); (void)SA;
104
    OS << " \"" << SA->getLabel() << "\"";
105
    if (SA->getIsLiteralLabel()) OS << " IsLiteralLabel";
106
  }
107
  void VisitAssertCapabilityAttr(const AssertCapabilityAttr *A) {
108
    const auto *SA = cast<AssertCapabilityAttr>(A); (void)SA;
109
    OS << " " << A->getSpelling();
110
  }
111
  void VisitAssumptionAttr(const AssumptionAttr *A) {
112
    const auto *SA = cast<AssumptionAttr>(A); (void)SA;
113
    OS << " \"" << SA->getAssumption() << "\"";
114
  }
115
  void VisitAvailabilityAttr(const AvailabilityAttr *A) {
116
    const auto *SA = cast<AvailabilityAttr>(A); (void)SA;
117
    if (SA->getPlatform())
118
      OS << " " << SA->getPlatform()->getName();
119
    OS << " " << SA->getIntroduced();
120
    OS << " " << SA->getDeprecated();
121
    OS << " " << SA->getObsoleted();
122
    if (SA->getUnavailable()) OS << " Unavailable";
123
    OS << " \"" << SA->getMessage() << "\"";
124
    if (SA->getStrict()) OS << " Strict";
125
    OS << " \"" << SA->getReplacement() << "\"";
126
    OS << " " << SA->getPriority();
127
  }
128
  void VisitBTFDeclTagAttr(const BTFDeclTagAttr *A) {
129
    const auto *SA = cast<BTFDeclTagAttr>(A); (void)SA;
130
    OS << " \"" << SA->getBTFDeclTag() << "\"";
131
  }
132
  void VisitBTFTypeTagAttr(const BTFTypeTagAttr *A) {
133
    const auto *SA = cast<BTFTypeTagAttr>(A); (void)SA;
134
    OS << " \"" << SA->getBTFTypeTag() << "\"";
135
  }
136
  void VisitBlocksAttr(const BlocksAttr *A) {
137
    const auto *SA = cast<BlocksAttr>(A); (void)SA;
138
    switch(SA->getType()) {
139
    case BlocksAttr::ByRef:
140
      OS << " ByRef";
141
      break;
142
    }
143
  }
144
  void VisitBuiltinAttr(const BuiltinAttr *A) {
145
    const auto *SA = cast<BuiltinAttr>(A); (void)SA;
146
    OS << " " << SA->getID();
147
  }
148
  void VisitBuiltinAliasAttr(const BuiltinAliasAttr *A) {
149
    const auto *SA = cast<BuiltinAliasAttr>(A); (void)SA;
150
    OS << " " << A->getSpelling();
151
    if (SA->getBuiltinName())
152
      OS << " " << SA->getBuiltinName()->getName();
153
  }
154
  void VisitCFGuardAttr(const CFGuardAttr *A) {
155
    const auto *SA = cast<CFGuardAttr>(A); (void)SA;
156
    switch(SA->getGuard()) {
157
    case CFGuardAttr::nocf:
158
      OS << " nocf";
159
      break;
160
    }
161
  }
162
  void VisitCPUDispatchAttr(const CPUDispatchAttr *A) {
163
    const auto *SA = cast<CPUDispatchAttr>(A); (void)SA;
164
    for (const auto &Val : SA->cpus())
165
      OS << " " << Val;
166
  }
167
  void VisitCPUSpecificAttr(const CPUSpecificAttr *A) {
168
    const auto *SA = cast<CPUSpecificAttr>(A); (void)SA;
169
    for (const auto &Val : SA->cpus())
170
      OS << " " << Val;
171
  }
172
  void VisitCXX11NoReturnAttr(const CXX11NoReturnAttr *A) {
173
    OS << " " << A->getSpelling();
174
  }
175
  void VisitCallableWhenAttr(const CallableWhenAttr *A) {
176
    const auto *SA = cast<CallableWhenAttr>(A); (void)SA;
177
    for (CallableWhenAttr::callableStates_iterator I = SA->callableStates_begin(), E = SA->callableStates_end(); I != E; ++I) {
178
      switch(*I) {
179
    case CallableWhenAttr::Unknown:
180
      OS << " Unknown";
181
      break;
182
    case CallableWhenAttr::Consumed:
183
      OS << " Consumed";
184
      break;
185
    case CallableWhenAttr::Unconsumed:
186
      OS << " Unconsumed";
187
      break;
188
      }
189
    }
190
  }
191
  void VisitCallbackAttr(const CallbackAttr *A) {
192
    const auto *SA = cast<CallbackAttr>(A); (void)SA;
193
    for (const auto &Val : SA->encoding())
194
      OS << " " << Val;
195
  }
196
  void VisitCapabilityAttr(const CapabilityAttr *A) {
197
    const auto *SA = cast<CapabilityAttr>(A); (void)SA;
198
    OS << " " << A->getSpelling();
199
    OS << " \"" << SA->getName() << "\"";
200
  }
201
  void VisitCleanupAttr(const CleanupAttr *A) {
202
    const auto *SA = cast<CleanupAttr>(A); (void)SA;
203
    OS << " ";
204
    dumpBareDeclRef(SA->getFunctionDecl());
205
  }
206
  void VisitCodeSegAttr(const CodeSegAttr *A) {
207
    const auto *SA = cast<CodeSegAttr>(A); (void)SA;
208
    OS << " \"" << SA->getName() << "\"";
209
  }
210
  void VisitConstInitAttr(const ConstInitAttr *A) {
211
    OS << " " << A->getSpelling();
212
  }
213
  void VisitConstructorAttr(const ConstructorAttr *A) {
214
    const auto *SA = cast<ConstructorAttr>(A); (void)SA;
215
    OS << " " << SA->getPriority();
216
  }
217
  void VisitConsumableAttr(const ConsumableAttr *A) {
218
    const auto *SA = cast<ConsumableAttr>(A); (void)SA;
219
    switch(SA->getDefaultState()) {
220
    case ConsumableAttr::Unknown:
221
      OS << " Unknown";
222
      break;
223
    case ConsumableAttr::Consumed:
224
      OS << " Consumed";
225
      break;
226
    case ConsumableAttr::Unconsumed:
227
      OS << " Unconsumed";
228
      break;
229
    }
230
  }
231
  void VisitDeprecatedAttr(const DeprecatedAttr *A) {
232
    const auto *SA = cast<DeprecatedAttr>(A); (void)SA;
233
    OS << " \"" << SA->getMessage() << "\"";
234
    OS << " \"" << SA->getReplacement() << "\"";
235
  }
236
  void VisitDestructorAttr(const DestructorAttr *A) {
237
    const auto *SA = cast<DestructorAttr>(A); (void)SA;
238
    OS << " " << SA->getPriority();
239
  }
240
  void VisitDiagnoseAsBuiltinAttr(const DiagnoseAsBuiltinAttr *A) {
241
    const auto *SA = cast<DiagnoseAsBuiltinAttr>(A); (void)SA;
242
    OS << " ";
243
    dumpBareDeclRef(SA->getFunction());
244
    for (const auto &Val : SA->argIndices())
245
      OS << " " << Val;
246
  }
247
  void VisitDiagnoseIfAttr(const DiagnoseIfAttr *A) {
248
    const auto *SA = cast<DiagnoseIfAttr>(A); (void)SA;
249
    OS << " \"" << SA->getMessage() << "\"";
250
    switch(SA->getDiagnosticType()) {
251
    case DiagnoseIfAttr::DT_Error:
252
      OS << " DT_Error";
253
      break;
254
    case DiagnoseIfAttr::DT_Warning:
255
      OS << " DT_Warning";
256
      break;
257
    }
258
    if (SA->getArgDependent()) OS << " ArgDependent";
259
    OS << " ";
260
    dumpBareDeclRef(SA->getParent());
261
  }
262
  void VisitEnableIfAttr(const EnableIfAttr *A) {
263
    const auto *SA = cast<EnableIfAttr>(A); (void)SA;
264
    OS << " \"" << SA->getMessage() << "\"";
265
  }
266
  void VisitEnforceTCBAttr(const EnforceTCBAttr *A) {
267
    const auto *SA = cast<EnforceTCBAttr>(A); (void)SA;
268
    OS << " \"" << SA->getTCBName() << "\"";
269
  }
270
  void VisitEnforceTCBLeafAttr(const EnforceTCBLeafAttr *A) {
271
    const auto *SA = cast<EnforceTCBLeafAttr>(A); (void)SA;
272
    OS << " \"" << SA->getTCBName() << "\"";
273
  }
274
  void VisitEnumExtensibilityAttr(const EnumExtensibilityAttr *A) {
275
    const auto *SA = cast<EnumExtensibilityAttr>(A); (void)SA;
276
    switch(SA->getExtensibility()) {
277
    case EnumExtensibilityAttr::Closed:
278
      OS << " Closed";
279
      break;
280
    case EnumExtensibilityAttr::Open:
281
      OS << " Open";
282
      break;
283
    }
284
  }
285
  void VisitErrorAttr(const ErrorAttr *A) {
286
    const auto *SA = cast<ErrorAttr>(A); (void)SA;
287
    OS << " " << A->getSpelling();
288
    OS << " \"" << SA->getUserDiagnostic() << "\"";
289
  }
290
  void VisitExternalSourceSymbolAttr(const ExternalSourceSymbolAttr *A) {
291
    const auto *SA = cast<ExternalSourceSymbolAttr>(A); (void)SA;
292
    OS << " \"" << SA->getLanguage() << "\"";
293
    OS << " \"" << SA->getDefinedIn() << "\"";
294
    if (SA->getGeneratedDeclaration()) OS << " GeneratedDeclaration";
295
  }
296
  void VisitFinalAttr(const FinalAttr *A) {
297
    OS << " " << A->getSpelling();
298
  }
299
  void VisitFormatAttr(const FormatAttr *A) {
300
    const auto *SA = cast<FormatAttr>(A); (void)SA;
301
    if (SA->getType())
302
      OS << " " << SA->getType()->getName();
303
    OS << " " << SA->getFormatIdx();
304
    OS << " " << SA->getFirstArg();
305
  }
306
  void VisitFormatArgAttr(const FormatArgAttr *A) {
307
    const auto *SA = cast<FormatArgAttr>(A); (void)SA;
308
    OS << " " << SA->getFormatIdx().getSourceIndex();
309
  }
310
  void VisitFunctionReturnThunksAttr(const FunctionReturnThunksAttr *A) {
311
    const auto *SA = cast<FunctionReturnThunksAttr>(A); (void)SA;
312
    switch(SA->getThunkType()) {
313
    case FunctionReturnThunksAttr::Keep:
314
      OS << " Keep";
315
      break;
316
    case FunctionReturnThunksAttr::Extern:
317
      OS << " Extern";
318
      break;
319
    }
320
  }
321
  void VisitHLSLNumThreadsAttr(const HLSLNumThreadsAttr *A) {
322
    const auto *SA = cast<HLSLNumThreadsAttr>(A); (void)SA;
323
    OS << " " << SA->getX();
324
    OS << " " << SA->getY();
325
    OS << " " << SA->getZ();
326
  }
327
  void VisitHLSLResourceAttr(const HLSLResourceAttr *A) {
328
    const auto *SA = cast<HLSLResourceAttr>(A); (void)SA;
329
    switch(SA->getResourceType()) {
330
    case HLSLResourceAttr::SRV:
331
      OS << " SRV";
332
      break;
333
    case HLSLResourceAttr::UAV:
334
      OS << " UAV";
335
      break;
336
    case HLSLResourceAttr::CBuffer:
337
      OS << " CBuffer";
338
      break;
339
    case HLSLResourceAttr::Sampler:
340
      OS << " Sampler";
341
      break;
342
    }
343
    switch(SA->getResourceShape()) {
344
    case HLSLResourceAttr::Texture1D:
345
      OS << " Texture1D";
346
      break;
347
    case HLSLResourceAttr::Texture2D:
348
      OS << " Texture2D";
349
      break;
350
    case HLSLResourceAttr::Texture2DMS:
351
      OS << " Texture2DMS";
352
      break;
353
    case HLSLResourceAttr::Texture3D:
354
      OS << " Texture3D";
355
      break;
356
    case HLSLResourceAttr::TextureCube:
357
      OS << " TextureCube";
358
      break;
359
    case HLSLResourceAttr::Texture1DArray:
360
      OS << " Texture1DArray";
361
      break;
362
    case HLSLResourceAttr::Texture2DArray:
363
      OS << " Texture2DArray";
364
      break;
365
    case HLSLResourceAttr::Texture2DMSArray:
366
      OS << " Texture2DMSArray";
367
      break;
368
    case HLSLResourceAttr::TextureCubeArray:
369
      OS << " TextureCubeArray";
370
      break;
371
    case HLSLResourceAttr::TypedBuffer:
372
      OS << " TypedBuffer";
373
      break;
374
    case HLSLResourceAttr::RawBuffer:
375
      OS << " RawBuffer";
376
      break;
377
    case HLSLResourceAttr::StructuredBuffer:
378
      OS << " StructuredBuffer";
379
      break;
380
    case HLSLResourceAttr::CBufferKind:
381
      OS << " CBufferKind";
382
      break;
383
    case HLSLResourceAttr::SamplerKind:
384
      OS << " SamplerKind";
385
      break;
386
    case HLSLResourceAttr::TBuffer:
387
      OS << " TBuffer";
388
      break;
389
    case HLSLResourceAttr::RTAccelerationStructure:
390
      OS << " RTAccelerationStructure";
391
      break;
392
    case HLSLResourceAttr::FeedbackTexture2D:
393
      OS << " FeedbackTexture2D";
394
      break;
395
    case HLSLResourceAttr::FeedbackTexture2DArray:
396
      OS << " FeedbackTexture2DArray";
397
      break;
398
    }
399
  }
400
  void VisitHLSLResourceBindingAttr(const HLSLResourceBindingAttr *A) {
401
    const auto *SA = cast<HLSLResourceBindingAttr>(A); (void)SA;
402
    OS << " \"" << SA->getSlot() << "\"";
403
    OS << " \"" << SA->getSpace() << "\"";
404
  }
405
  void VisitHLSLShaderAttr(const HLSLShaderAttr *A) {
406
    const auto *SA = cast<HLSLShaderAttr>(A); (void)SA;
407
    switch(SA->getType()) {
408
    case HLSLShaderAttr::Pixel:
409
      OS << " Pixel";
410
      break;
411
    case HLSLShaderAttr::Vertex:
412
      OS << " Vertex";
413
      break;
414
    case HLSLShaderAttr::Geometry:
415
      OS << " Geometry";
416
      break;
417
    case HLSLShaderAttr::Hull:
418
      OS << " Hull";
419
      break;
420
    case HLSLShaderAttr::Domain:
421
      OS << " Domain";
422
      break;
423
    case HLSLShaderAttr::Compute:
424
      OS << " Compute";
425
      break;
426
    case HLSLShaderAttr::Library:
427
      OS << " Library";
428
      break;
429
    case HLSLShaderAttr::RayGeneration:
430
      OS << " RayGeneration";
431
      break;
432
    case HLSLShaderAttr::Intersection:
433
      OS << " Intersection";
434
      break;
435
    case HLSLShaderAttr::AnyHit:
436
      OS << " AnyHit";
437
      break;
438
    case HLSLShaderAttr::ClosestHit:
439
      OS << " ClosestHit";
440
      break;
441
    case HLSLShaderAttr::Miss:
442
      OS << " Miss";
443
      break;
444
    case HLSLShaderAttr::Callable:
445
      OS << " Callable";
446
      break;
447
    case HLSLShaderAttr::Mesh:
448
      OS << " Mesh";
449
      break;
450
    case HLSLShaderAttr::Amplification:
451
      OS << " Amplification";
452
      break;
453
    }
454
  }
455
  void VisitIBOutletCollectionAttr(const IBOutletCollectionAttr *A) {
456
    const auto *SA = cast<IBOutletCollectionAttr>(A); (void)SA;
457
    if (SA->getInterfaceLoc())    OS << " " << SA->getInterface().getAsString();
458
  }
459
  void VisitIFuncAttr(const IFuncAttr *A) {
460
    const auto *SA = cast<IFuncAttr>(A); (void)SA;
461
    OS << " \"" << SA->getResolver() << "\"";
462
  }
463
  void VisitInitPriorityAttr(const InitPriorityAttr *A) {
464
    const auto *SA = cast<InitPriorityAttr>(A); (void)SA;
465
    OS << " " << SA->getPriority();
466
  }
467
  void VisitInitSegAttr(const InitSegAttr *A) {
468
    const auto *SA = cast<InitSegAttr>(A); (void)SA;
469
    OS << " \"" << SA->getSection() << "\"";
470
  }
471
  void VisitLayoutVersionAttr(const LayoutVersionAttr *A) {
472
    const auto *SA = cast<LayoutVersionAttr>(A); (void)SA;
473
    OS << " " << SA->getVersion();
474
  }
475
  void VisitLoopHintAttr(const LoopHintAttr *A) {
476
    const auto *SA = cast<LoopHintAttr>(A); (void)SA;
477
    OS << " " << A->getSpelling();
478
    switch(SA->getOption()) {
479
    case LoopHintAttr::Vectorize:
480
      OS << " Vectorize";
481
      break;
482
    case LoopHintAttr::VectorizeWidth:
483
      OS << " VectorizeWidth";
484
      break;
485
    case LoopHintAttr::Interleave:
486
      OS << " Interleave";
487
      break;
488
    case LoopHintAttr::InterleaveCount:
489
      OS << " InterleaveCount";
490
      break;
491
    case LoopHintAttr::Unroll:
492
      OS << " Unroll";
493
      break;
494
    case LoopHintAttr::UnrollCount:
495
      OS << " UnrollCount";
496
      break;
497
    case LoopHintAttr::UnrollAndJam:
498
      OS << " UnrollAndJam";
499
      break;
500
    case LoopHintAttr::UnrollAndJamCount:
501
      OS << " UnrollAndJamCount";
502
      break;
503
    case LoopHintAttr::PipelineDisabled:
504
      OS << " PipelineDisabled";
505
      break;
506
    case LoopHintAttr::PipelineInitiationInterval:
507
      OS << " PipelineInitiationInterval";
508
      break;
509
    case LoopHintAttr::Distribute:
510
      OS << " Distribute";
511
      break;
512
    case LoopHintAttr::VectorizePredicate:
513
      OS << " VectorizePredicate";
514
      break;
515
    }
516
    switch(SA->getState()) {
517
    case LoopHintAttr::Enable:
518
      OS << " Enable";
519
      break;
520
    case LoopHintAttr::Disable:
521
      OS << " Disable";
522
      break;
523
    case LoopHintAttr::Numeric:
524
      OS << " Numeric";
525
      break;
526
    case LoopHintAttr::FixedWidth:
527
      OS << " FixedWidth";
528
      break;
529
    case LoopHintAttr::ScalableWidth:
530
      OS << " ScalableWidth";
531
      break;
532
    case LoopHintAttr::AssumeSafety:
533
      OS << " AssumeSafety";
534
      break;
535
    case LoopHintAttr::Full:
536
      OS << " Full";
537
      break;
538
    }
539
  }
540
  void VisitM68kInterruptAttr(const M68kInterruptAttr *A) {
541
    const auto *SA = cast<M68kInterruptAttr>(A); (void)SA;
542
    OS << " " << SA->getNumber();
543
  }
544
  void VisitMSInheritanceAttr(const MSInheritanceAttr *A) {
545
    const auto *SA = cast<MSInheritanceAttr>(A); (void)SA;
546
    OS << " " << A->getSpelling();
547
    if (SA->getBestCase()) OS << " BestCase";
548
  }
549
  void VisitMSP430InterruptAttr(const MSP430InterruptAttr *A) {
550
    const auto *SA = cast<MSP430InterruptAttr>(A); (void)SA;
551
    OS << " " << SA->getNumber();
552
  }
553
  void VisitMSVtorDispAttr(const MSVtorDispAttr *A) {
554
    const auto *SA = cast<MSVtorDispAttr>(A); (void)SA;
555
    OS << " " << SA->getVdm();
556
  }
557
  void VisitMaxFieldAlignmentAttr(const MaxFieldAlignmentAttr *A) {
558
    const auto *SA = cast<MaxFieldAlignmentAttr>(A); (void)SA;
559
    OS << " " << SA->getAlignment();
560
  }
561
  void VisitMinVectorWidthAttr(const MinVectorWidthAttr *A) {
562
    const auto *SA = cast<MinVectorWidthAttr>(A); (void)SA;
563
    OS << " " << SA->getVectorWidth();
564
  }
565
  void VisitMipsInterruptAttr(const MipsInterruptAttr *A) {
566
    const auto *SA = cast<MipsInterruptAttr>(A); (void)SA;
567
    switch(SA->getInterrupt()) {
568
    case MipsInterruptAttr::sw0:
569
      OS << " sw0";
570
      break;
571
    case MipsInterruptAttr::sw1:
572
      OS << " sw1";
573
      break;
574
    case MipsInterruptAttr::hw0:
575
      OS << " hw0";
576
      break;
577
    case MipsInterruptAttr::hw1:
578
      OS << " hw1";
579
      break;
580
    case MipsInterruptAttr::hw2:
581
      OS << " hw2";
582
      break;
583
    case MipsInterruptAttr::hw3:
584
      OS << " hw3";
585
      break;
586
    case MipsInterruptAttr::hw4:
587
      OS << " hw4";
588
      break;
589
    case MipsInterruptAttr::hw5:
590
      OS << " hw5";
591
      break;
592
    case MipsInterruptAttr::eic:
593
      OS << " eic";
594
      break;
595
    }
596
  }
597
  void VisitMipsLongCallAttr(const MipsLongCallAttr *A) {
598
    OS << " " << A->getSpelling();
599
  }
600
  void VisitMipsShortCallAttr(const MipsShortCallAttr *A) {
601
    OS << " " << A->getSpelling();
602
  }
603
  void VisitModeAttr(const ModeAttr *A) {
604
    const auto *SA = cast<ModeAttr>(A); (void)SA;
605
    if (SA->getMode())
606
      OS << " " << SA->getMode()->getName();
607
  }
608
  void VisitNSErrorDomainAttr(const NSErrorDomainAttr *A) {
609
    const auto *SA = cast<NSErrorDomainAttr>(A); (void)SA;
610
    OS << " ";
611
    dumpBareDeclRef(SA->getErrorDomain());
612
  }
613
  void VisitNoBuiltinAttr(const NoBuiltinAttr *A) {
614
    const auto *SA = cast<NoBuiltinAttr>(A); (void)SA;
615
    for (const auto &Val : SA->builtinNames())
616
      OS << " " << Val;
617
  }
618
  void VisitNoSanitizeAttr(const NoSanitizeAttr *A) {
619
    const auto *SA = cast<NoSanitizeAttr>(A); (void)SA;
620
    for (const auto &Val : SA->sanitizers())
621
      OS << " " << Val;
622
  }
623
  void VisitNoStackProtectorAttr(const NoStackProtectorAttr *A) {
624
    OS << " " << A->getSpelling();
625
  }
626
  void VisitNonNullAttr(const NonNullAttr *A) {
627
    const auto *SA = cast<NonNullAttr>(A); (void)SA;
628
    for (const auto &Val : SA->args())
629
      OS << " " << Val.getSourceIndex();
630
  }
631
  void VisitOMPAllocateDeclAttr(const OMPAllocateDeclAttr *A) {
632
    const auto *SA = cast<OMPAllocateDeclAttr>(A); (void)SA;
633
    switch(SA->getAllocatorType()) {
634
    case OMPAllocateDeclAttr::OMPNullMemAlloc:
635
      OS << " OMPNullMemAlloc";
636
      break;
637
    case OMPAllocateDeclAttr::OMPDefaultMemAlloc:
638
      OS << " OMPDefaultMemAlloc";
639
      break;
640
    case OMPAllocateDeclAttr::OMPLargeCapMemAlloc:
641
      OS << " OMPLargeCapMemAlloc";
642
      break;
643
    case OMPAllocateDeclAttr::OMPConstMemAlloc:
644
      OS << " OMPConstMemAlloc";
645
      break;
646
    case OMPAllocateDeclAttr::OMPHighBWMemAlloc:
647
      OS << " OMPHighBWMemAlloc";
648
      break;
649
    case OMPAllocateDeclAttr::OMPLowLatMemAlloc:
650
      OS << " OMPLowLatMemAlloc";
651
      break;
652
    case OMPAllocateDeclAttr::OMPCGroupMemAlloc:
653
      OS << " OMPCGroupMemAlloc";
654
      break;
655
    case OMPAllocateDeclAttr::OMPPTeamMemAlloc:
656
      OS << " OMPPTeamMemAlloc";
657
      break;
658
    case OMPAllocateDeclAttr::OMPThreadMemAlloc:
659
      OS << " OMPThreadMemAlloc";
660
      break;
661
    case OMPAllocateDeclAttr::OMPUserDefinedMemAlloc:
662
      OS << " OMPUserDefinedMemAlloc";
663
      break;
664
    }
665
  }
666
  void VisitOMPCaptureKindAttr(const OMPCaptureKindAttr *A) {
667
    const auto *SA = cast<OMPCaptureKindAttr>(A); (void)SA;
668
    OS << " " << SA->getCaptureKindVal();
669
  }
670
  void VisitOMPDeclareSimdDeclAttr(const OMPDeclareSimdDeclAttr *A) {
671
    const auto *SA = cast<OMPDeclareSimdDeclAttr>(A); (void)SA;
672
    switch(SA->getBranchState()) {
673
    case OMPDeclareSimdDeclAttr::BS_Undefined:
674
      OS << " BS_Undefined";
675
      break;
676
    case OMPDeclareSimdDeclAttr::BS_Inbranch:
677
      OS << " BS_Inbranch";
678
      break;
679
    case OMPDeclareSimdDeclAttr::BS_Notinbranch:
680
      OS << " BS_Notinbranch";
681
      break;
682
    }
683
    for (const auto &Val : SA->modifiers())
684
      OS << " " << Val;
685
  }
686
  void VisitOMPDeclareTargetDeclAttr(const OMPDeclareTargetDeclAttr *A) {
687
    const auto *SA = cast<OMPDeclareTargetDeclAttr>(A); (void)SA;
688
    switch(SA->getMapType()) {
689
    case OMPDeclareTargetDeclAttr::MT_To:
690
      OS << " MT_To";
691
      break;
692
    case OMPDeclareTargetDeclAttr::MT_Enter:
693
      OS << " MT_Enter";
694
      break;
695
    case OMPDeclareTargetDeclAttr::MT_Link:
696
      OS << " MT_Link";
697
      break;
698
    }
699
    switch(SA->getDevType()) {
700
    case OMPDeclareTargetDeclAttr::DT_Host:
701
      OS << " DT_Host";
702
      break;
703
    case OMPDeclareTargetDeclAttr::DT_NoHost:
704
      OS << " DT_NoHost";
705
      break;
706
    case OMPDeclareTargetDeclAttr::DT_Any:
707
      OS << " DT_Any";
708
      break;
709
    }
710
    if (SA->getIndirect()) OS << " Indirect";
711
    OS << " " << SA->getLevel();
712
  }
713
  void VisitOMPDeclareVariantAttr(const OMPDeclareVariantAttr *A) {
714
    const auto *SA = cast<OMPDeclareVariantAttr>(A); (void)SA;
715
    OS << " " << SA->getTraitInfos();
716
    for (OMPDeclareVariantAttr::appendArgs_iterator I = SA->appendArgs_begin(), E = SA->appendArgs_end(); I != E; ++I) {
717
      if (I->IsTarget && I->IsTargetSync)
718
        OS << " Target_TargetSync";
719
      else if (I->IsTarget)
720
        OS << " Target";
721
      else
722
        OS << " TargetSync";
723
    }
724
  }
725
  void VisitObjCBridgeAttr(const ObjCBridgeAttr *A) {
726
    const auto *SA = cast<ObjCBridgeAttr>(A); (void)SA;
727
    if (SA->getBridgedType())
728
      OS << " " << SA->getBridgedType()->getName();
729
  }
730
  void VisitObjCBridgeMutableAttr(const ObjCBridgeMutableAttr *A) {
731
    const auto *SA = cast<ObjCBridgeMutableAttr>(A); (void)SA;
732
    if (SA->getBridgedType())
733
      OS << " " << SA->getBridgedType()->getName();
734
  }
735
  void VisitObjCBridgeRelatedAttr(const ObjCBridgeRelatedAttr *A) {
736
    const auto *SA = cast<ObjCBridgeRelatedAttr>(A); (void)SA;
737
    if (SA->getRelatedClass())
738
      OS << " " << SA->getRelatedClass()->getName();
739
    if (SA->getClassMethod())
740
      OS << " " << SA->getClassMethod()->getName();
741
    if (SA->getInstanceMethod())
742
      OS << " " << SA->getInstanceMethod()->getName();
743
  }
744
  void VisitObjCGCAttr(const ObjCGCAttr *A) {
745
    const auto *SA = cast<ObjCGCAttr>(A); (void)SA;
746
    if (SA->getKind())
747
      OS << " " << SA->getKind()->getName();
748
  }
749
  void VisitObjCMethodFamilyAttr(const ObjCMethodFamilyAttr *A) {
750
    const auto *SA = cast<ObjCMethodFamilyAttr>(A); (void)SA;
751
    switch(SA->getFamily()) {
752
    case ObjCMethodFamilyAttr::OMF_None:
753
      OS << " OMF_None";
754
      break;
755
    case ObjCMethodFamilyAttr::OMF_alloc:
756
      OS << " OMF_alloc";
757
      break;
758
    case ObjCMethodFamilyAttr::OMF_copy:
759
      OS << " OMF_copy";
760
      break;
761
    case ObjCMethodFamilyAttr::OMF_init:
762
      OS << " OMF_init";
763
      break;
764
    case ObjCMethodFamilyAttr::OMF_mutableCopy:
765
      OS << " OMF_mutableCopy";
766
      break;
767
    case ObjCMethodFamilyAttr::OMF_new:
768
      OS << " OMF_new";
769
      break;
770
    }
771
  }
772
  void VisitObjCOwnershipAttr(const ObjCOwnershipAttr *A) {
773
    const auto *SA = cast<ObjCOwnershipAttr>(A); (void)SA;
774
    if (SA->getKind())
775
      OS << " " << SA->getKind()->getName();
776
  }
777
  void VisitObjCRuntimeNameAttr(const ObjCRuntimeNameAttr *A) {
778
    const auto *SA = cast<ObjCRuntimeNameAttr>(A); (void)SA;
779
    OS << " \"" << SA->getMetadataName() << "\"";
780
  }
781
  void VisitOpenCLAccessAttr(const OpenCLAccessAttr *A) {
782
    OS << " " << A->getSpelling();
783
  }
784
  void VisitOpenCLConstantAddressSpaceAttr(const OpenCLConstantAddressSpaceAttr *A) {
785
    OS << " " << A->getSpelling();
786
  }
787
  void VisitOpenCLGenericAddressSpaceAttr(const OpenCLGenericAddressSpaceAttr *A) {
788
    OS << " " << A->getSpelling();
789
  }
790
  void VisitOpenCLGlobalAddressSpaceAttr(const OpenCLGlobalAddressSpaceAttr *A) {
791
    OS << " " << A->getSpelling();
792
  }
793
  void VisitOpenCLIntelReqdSubGroupSizeAttr(const OpenCLIntelReqdSubGroupSizeAttr *A) {
794
    const auto *SA = cast<OpenCLIntelReqdSubGroupSizeAttr>(A); (void)SA;
795
    OS << " " << SA->getSubGroupSize();
796
  }
797
  void VisitOpenCLLocalAddressSpaceAttr(const OpenCLLocalAddressSpaceAttr *A) {
798
    OS << " " << A->getSpelling();
799
  }
800
  void VisitOpenCLPrivateAddressSpaceAttr(const OpenCLPrivateAddressSpaceAttr *A) {
801
    OS << " " << A->getSpelling();
802
  }
803
  void VisitOpenCLUnrollHintAttr(const OpenCLUnrollHintAttr *A) {
804
    const auto *SA = cast<OpenCLUnrollHintAttr>(A); (void)SA;
805
    OS << " " << SA->getUnrollHint();
806
  }
807
  void VisitOwnerAttr(const OwnerAttr *A) {
808
    const auto *SA = cast<OwnerAttr>(A); (void)SA;
809
    if (SA->getDerefTypeLoc())    OS << " " << SA->getDerefType().getAsString();
810
  }
811
  void VisitOwnershipAttr(const OwnershipAttr *A) {
812
    const auto *SA = cast<OwnershipAttr>(A); (void)SA;
813
    OS << " " << A->getSpelling();
814
    if (SA->getModule())
815
      OS << " " << SA->getModule()->getName();
816
    for (const auto &Val : SA->args())
817
      OS << " " << Val.getSourceIndex();
818
  }
819
  void VisitParamTypestateAttr(const ParamTypestateAttr *A) {
820
    const auto *SA = cast<ParamTypestateAttr>(A); (void)SA;
821
    switch(SA->getParamState()) {
822
    case ParamTypestateAttr::Unknown:
823
      OS << " Unknown";
824
      break;
825
    case ParamTypestateAttr::Consumed:
826
      OS << " Consumed";
827
      break;
828
    case ParamTypestateAttr::Unconsumed:
829
      OS << " Unconsumed";
830
      break;
831
    }
832
  }
833
  void VisitPassObjectSizeAttr(const PassObjectSizeAttr *A) {
834
    const auto *SA = cast<PassObjectSizeAttr>(A); (void)SA;
835
    OS << " " << A->getSpelling();
836
    OS << " " << SA->getType();
837
  }
838
  void VisitPatchableFunctionEntryAttr(const PatchableFunctionEntryAttr *A) {
839
    const auto *SA = cast<PatchableFunctionEntryAttr>(A); (void)SA;
840
    OS << " " << SA->getCount();
841
    OS << " " << SA->getOffset();
842
  }
843
  void VisitPcsAttr(const PcsAttr *A) {
844
    const auto *SA = cast<PcsAttr>(A); (void)SA;
845
    switch(SA->getPCS()) {
846
    case PcsAttr::AAPCS:
847
      OS << " AAPCS";
848
      break;
849
    case PcsAttr::AAPCS_VFP:
850
      OS << " AAPCS_VFP";
851
      break;
852
    }
853
  }
854
  void VisitPointerAttr(const PointerAttr *A) {
855
    const auto *SA = cast<PointerAttr>(A); (void)SA;
856
    if (SA->getDerefTypeLoc())    OS << " " << SA->getDerefType().getAsString();
857
  }
858
  void VisitPragmaClangBSSSectionAttr(const PragmaClangBSSSectionAttr *A) {
859
    const auto *SA = cast<PragmaClangBSSSectionAttr>(A); (void)SA;
860
    OS << " \"" << SA->getName() << "\"";
861
  }
862
  void VisitPragmaClangDataSectionAttr(const PragmaClangDataSectionAttr *A) {
863
    const auto *SA = cast<PragmaClangDataSectionAttr>(A); (void)SA;
864
    OS << " \"" << SA->getName() << "\"";
865
  }
866
  void VisitPragmaClangRelroSectionAttr(const PragmaClangRelroSectionAttr *A) {
867
    const auto *SA = cast<PragmaClangRelroSectionAttr>(A); (void)SA;
868
    OS << " \"" << SA->getName() << "\"";
869
  }
870
  void VisitPragmaClangRodataSectionAttr(const PragmaClangRodataSectionAttr *A) {
871
    const auto *SA = cast<PragmaClangRodataSectionAttr>(A); (void)SA;
872
    OS << " \"" << SA->getName() << "\"";
873
  }
874
  void VisitPragmaClangTextSectionAttr(const PragmaClangTextSectionAttr *A) {
875
    const auto *SA = cast<PragmaClangTextSectionAttr>(A); (void)SA;
876
    OS << " \"" << SA->getName() << "\"";
877
  }
878
  void VisitPreferredNameAttr(const PreferredNameAttr *A) {
879
    const auto *SA = cast<PreferredNameAttr>(A); (void)SA;
880
    OS << " " << SA->getTypedefType().getAsString();
881
  }
882
  void VisitRISCVInterruptAttr(const RISCVInterruptAttr *A) {
883
    const auto *SA = cast<RISCVInterruptAttr>(A); (void)SA;
884
    switch(SA->getInterrupt()) {
885
    case RISCVInterruptAttr::user:
886
      OS << " user";
887
      break;
888
    case RISCVInterruptAttr::supervisor:
889
      OS << " supervisor";
890
      break;
891
    case RISCVInterruptAttr::machine:
892
      OS << " machine";
893
      break;
894
    }
895
  }
896
  void VisitReleaseCapabilityAttr(const ReleaseCapabilityAttr *A) {
897
    const auto *SA = cast<ReleaseCapabilityAttr>(A); (void)SA;
898
    OS << " " << A->getSpelling();
899
  }
900
  void VisitReleaseHandleAttr(const ReleaseHandleAttr *A) {
901
    const auto *SA = cast<ReleaseHandleAttr>(A); (void)SA;
902
    OS << " \"" << SA->getHandleType() << "\"";
903
  }
904
  void VisitReqdWorkGroupSizeAttr(const ReqdWorkGroupSizeAttr *A) {
905
    const auto *SA = cast<ReqdWorkGroupSizeAttr>(A); (void)SA;
906
    OS << " " << SA->getXDim();
907
    OS << " " << SA->getYDim();
908
    OS << " " << SA->getZDim();
909
  }
910
  void VisitRequiresCapabilityAttr(const RequiresCapabilityAttr *A) {
911
    const auto *SA = cast<RequiresCapabilityAttr>(A); (void)SA;
912
    OS << " " << A->getSpelling();
913
  }
914
  void VisitRestrictAttr(const RestrictAttr *A) {
915
    OS << " " << A->getSpelling();
916
  }
917
  void VisitReturnTypestateAttr(const ReturnTypestateAttr *A) {
918
    const auto *SA = cast<ReturnTypestateAttr>(A); (void)SA;
919
    switch(SA->getState()) {
920
    case ReturnTypestateAttr::Unknown:
921
      OS << " Unknown";
922
      break;
923
    case ReturnTypestateAttr::Consumed:
924
      OS << " Consumed";
925
      break;
926
    case ReturnTypestateAttr::Unconsumed:
927
      OS << " Unconsumed";
928
      break;
929
    }
930
  }
931
  void VisitSectionAttr(const SectionAttr *A) {
932
    const auto *SA = cast<SectionAttr>(A); (void)SA;
933
    OS << " " << A->getSpelling();
934
    OS << " \"" << SA->getName() << "\"";
935
  }
936
  void VisitSentinelAttr(const SentinelAttr *A) {
937
    const auto *SA = cast<SentinelAttr>(A); (void)SA;
938
    OS << " " << SA->getSentinel();
939
    OS << " " << SA->getNullPos();
940
  }
941
  void VisitSetTypestateAttr(const SetTypestateAttr *A) {
942
    const auto *SA = cast<SetTypestateAttr>(A); (void)SA;
943
    switch(SA->getNewState()) {
944
    case SetTypestateAttr::Unknown:
945
      OS << " Unknown";
946
      break;
947
    case SetTypestateAttr::Consumed:
948
      OS << " Consumed";
949
      break;
950
    case SetTypestateAttr::Unconsumed:
951
      OS << " Unconsumed";
952
      break;
953
    }
954
  }
955
  void VisitSuppressAttr(const SuppressAttr *A) {
956
    const auto *SA = cast<SuppressAttr>(A); (void)SA;
957
    for (const auto &Val : SA->diagnosticIdentifiers())
958
      OS << " " << Val;
959
  }
960
  void VisitSwiftAsyncAttr(const SwiftAsyncAttr *A) {
961
    const auto *SA = cast<SwiftAsyncAttr>(A); (void)SA;
962
    switch(SA->getKind()) {
963
    case SwiftAsyncAttr::None:
964
      OS << " None";
965
      break;
966
    case SwiftAsyncAttr::SwiftPrivate:
967
      OS << " SwiftPrivate";
968
      break;
969
    case SwiftAsyncAttr::NotSwiftPrivate:
970
      OS << " NotSwiftPrivate";
971
      break;
972
    }
973
    if (SA->getCompletionHandlerIndex().isValid())
974
      OS << " " << SA->getCompletionHandlerIndex().getSourceIndex();
975
  }
976
  void VisitSwiftAsyncErrorAttr(const SwiftAsyncErrorAttr *A) {
977
    const auto *SA = cast<SwiftAsyncErrorAttr>(A); (void)SA;
978
    switch(SA->getConvention()) {
979
    case SwiftAsyncErrorAttr::None:
980
      OS << " None";
981
      break;
982
    case SwiftAsyncErrorAttr::NonNullError:
983
      OS << " NonNullError";
984
      break;
985
    case SwiftAsyncErrorAttr::ZeroArgument:
986
      OS << " ZeroArgument";
987
      break;
988
    case SwiftAsyncErrorAttr::NonZeroArgument:
989
      OS << " NonZeroArgument";
990
      break;
991
    }
992
    OS << " " << SA->getHandlerParamIdx();
993
  }
994
  void VisitSwiftAsyncNameAttr(const SwiftAsyncNameAttr *A) {
995
    const auto *SA = cast<SwiftAsyncNameAttr>(A); (void)SA;
996
    OS << " \"" << SA->getName() << "\"";
997
  }
998
  void VisitSwiftAttrAttr(const SwiftAttrAttr *A) {
999
    const auto *SA = cast<SwiftAttrAttr>(A); (void)SA;
1000
    OS << " \"" << SA->getAttribute() << "\"";
1001
  }
1002
  void VisitSwiftBridgeAttr(const SwiftBridgeAttr *A) {
1003
    const auto *SA = cast<SwiftBridgeAttr>(A); (void)SA;
1004
    OS << " \"" << SA->getSwiftType() << "\"";
1005
  }
1006
  void VisitSwiftErrorAttr(const SwiftErrorAttr *A) {
1007
    const auto *SA = cast<SwiftErrorAttr>(A); (void)SA;
1008
    switch(SA->getConvention()) {
1009
    case SwiftErrorAttr::None:
1010
      OS << " None";
1011
      break;
1012
    case SwiftErrorAttr::NonNullError:
1013
      OS << " NonNullError";
1014
      break;
1015
    case SwiftErrorAttr::NullResult:
1016
      OS << " NullResult";
1017
      break;
1018
    case SwiftErrorAttr::ZeroResult:
1019
      OS << " ZeroResult";
1020
      break;
1021
    case SwiftErrorAttr::NonZeroResult:
1022
      OS << " NonZeroResult";
1023
      break;
1024
    }
1025
  }
1026
  void VisitSwiftNameAttr(const SwiftNameAttr *A) {
1027
    const auto *SA = cast<SwiftNameAttr>(A); (void)SA;
1028
    OS << " \"" << SA->getName() << "\"";
1029
  }
1030
  void VisitSwiftNewTypeAttr(const SwiftNewTypeAttr *A) {
1031
    const auto *SA = cast<SwiftNewTypeAttr>(A); (void)SA;
1032
    OS << " " << A->getSpelling();
1033
    switch(SA->getNewtypeKind()) {
1034
    case SwiftNewTypeAttr::NK_Struct:
1035
      OS << " NK_Struct";
1036
      break;
1037
    case SwiftNewTypeAttr::NK_Enum:
1038
      OS << " NK_Enum";
1039
      break;
1040
    }
1041
  }
1042
  void VisitTLSModelAttr(const TLSModelAttr *A) {
1043
    const auto *SA = cast<TLSModelAttr>(A); (void)SA;
1044
    OS << " \"" << SA->getModel() << "\"";
1045
  }
1046
  void VisitTargetAttr(const TargetAttr *A) {
1047
    const auto *SA = cast<TargetAttr>(A); (void)SA;
1048
    OS << " \"" << SA->getFeaturesStr() << "\"";
1049
  }
1050
  void VisitTargetClonesAttr(const TargetClonesAttr *A) {
1051
    const auto *SA = cast<TargetClonesAttr>(A); (void)SA;
1052
    for (const auto &Val : SA->featuresStrs())
1053
      OS << " " << Val;
1054
  }
1055
  void VisitTargetVersionAttr(const TargetVersionAttr *A) {
1056
    const auto *SA = cast<TargetVersionAttr>(A); (void)SA;
1057
    OS << " \"" << SA->getNamesStr() << "\"";
1058
  }
1059
  void VisitTestTypestateAttr(const TestTypestateAttr *A) {
1060
    const auto *SA = cast<TestTypestateAttr>(A); (void)SA;
1061
    switch(SA->getTestState()) {
1062
    case TestTypestateAttr::Consumed:
1063
      OS << " Consumed";
1064
      break;
1065
    case TestTypestateAttr::Unconsumed:
1066
      OS << " Unconsumed";
1067
      break;
1068
    }
1069
  }
1070
  void VisitTryAcquireCapabilityAttr(const TryAcquireCapabilityAttr *A) {
1071
    const auto *SA = cast<TryAcquireCapabilityAttr>(A); (void)SA;
1072
    OS << " " << A->getSpelling();
1073
  }
1074
  void VisitTypeTagForDatatypeAttr(const TypeTagForDatatypeAttr *A) {
1075
    const auto *SA = cast<TypeTagForDatatypeAttr>(A); (void)SA;
1076
    if (SA->getArgumentKind())
1077
      OS << " " << SA->getArgumentKind()->getName();
1078
    OS << " " << SA->getMatchingCType().getAsString();
1079
    if (SA->getLayoutCompatible()) OS << " LayoutCompatible";
1080
    if (SA->getMustBeNull()) OS << " MustBeNull";
1081
  }
1082
  void VisitTypeVisibilityAttr(const TypeVisibilityAttr *A) {
1083
    const auto *SA = cast<TypeVisibilityAttr>(A); (void)SA;
1084
    switch(SA->getVisibility()) {
1085
    case TypeVisibilityAttr::Default:
1086
      OS << " Default";
1087
      break;
1088
    case TypeVisibilityAttr::Hidden:
1089
      OS << " Hidden";
1090
      break;
1091
    case TypeVisibilityAttr::Protected:
1092
      OS << " Protected";
1093
      break;
1094
    }
1095
  }
1096
  void VisitUnavailableAttr(const UnavailableAttr *A) {
1097
    const auto *SA = cast<UnavailableAttr>(A); (void)SA;
1098
    OS << " \"" << SA->getMessage() << "\"";
1099
    switch(SA->getImplicitReason()) {
1100
    case UnavailableAttr::IR_None:
1101
      OS << " IR_None";
1102
      break;
1103
    case UnavailableAttr::IR_ARCForbiddenType:
1104
      OS << " IR_ARCForbiddenType";
1105
      break;
1106
    case UnavailableAttr::IR_ForbiddenWeak:
1107
      OS << " IR_ForbiddenWeak";
1108
      break;
1109
    case UnavailableAttr::IR_ARCForbiddenConversion:
1110
      OS << " IR_ARCForbiddenConversion";
1111
      break;
1112
    case UnavailableAttr::IR_ARCInitReturnsUnrelated:
1113
      OS << " IR_ARCInitReturnsUnrelated";
1114
      break;
1115
    case UnavailableAttr::IR_ARCFieldWithOwnership:
1116
      OS << " IR_ARCFieldWithOwnership";
1117
      break;
1118
    }
1119
  }
1120
  void VisitUnusedAttr(const UnusedAttr *A) {
1121
    OS << " " << A->getSpelling();
1122
  }
1123
  void VisitUseHandleAttr(const UseHandleAttr *A) {
1124
    const auto *SA = cast<UseHandleAttr>(A); (void)SA;
1125
    OS << " \"" << SA->getHandleType() << "\"";
1126
  }
1127
  void VisitUuidAttr(const UuidAttr *A) {
1128
    const auto *SA = cast<UuidAttr>(A); (void)SA;
1129
    OS << " \"" << SA->getGuid() << "\"";
1130
    OS << " ";
1131
    dumpBareDeclRef(SA->getGuidDecl());
1132
  }
1133
  void VisitVecTypeHintAttr(const VecTypeHintAttr *A) {
1134
    const auto *SA = cast<VecTypeHintAttr>(A); (void)SA;
1135
    OS << " " << SA->getTypeHint().getAsString();
1136
  }
1137
  void VisitVisibilityAttr(const VisibilityAttr *A) {
1138
    const auto *SA = cast<VisibilityAttr>(A); (void)SA;
1139
    switch(SA->getVisibility()) {
1140
    case VisibilityAttr::Default:
1141
      OS << " Default";
1142
      break;
1143
    case VisibilityAttr::Hidden:
1144
      OS << " Hidden";
1145
      break;
1146
    case VisibilityAttr::Protected:
1147
      OS << " Protected";
1148
      break;
1149
    }
1150
  }
1151
  void VisitWarnUnusedResultAttr(const WarnUnusedResultAttr *A) {
1152
    const auto *SA = cast<WarnUnusedResultAttr>(A); (void)SA;
1153
    OS << " " << A->getSpelling();
1154
    OS << " \"" << SA->getMessage() << "\"";
1155
  }
1156
  void VisitWeakRefAttr(const WeakRefAttr *A) {
1157
    const auto *SA = cast<WeakRefAttr>(A); (void)SA;
1158
    OS << " \"" << SA->getAliasee() << "\"";
1159
  }
1160
  void VisitWebAssemblyExportNameAttr(const WebAssemblyExportNameAttr *A) {
1161
    const auto *SA = cast<WebAssemblyExportNameAttr>(A); (void)SA;
1162
    OS << " \"" << SA->getExportName() << "\"";
1163
  }
1164
  void VisitWebAssemblyImportModuleAttr(const WebAssemblyImportModuleAttr *A) {
1165
    const auto *SA = cast<WebAssemblyImportModuleAttr>(A); (void)SA;
1166
    OS << " \"" << SA->getImportModule() << "\"";
1167
  }
1168
  void VisitWebAssemblyImportNameAttr(const WebAssemblyImportNameAttr *A) {
1169
    const auto *SA = cast<WebAssemblyImportNameAttr>(A); (void)SA;
1170
    OS << " \"" << SA->getImportName() << "\"";
1171
  }
1172
  void VisitWorkGroupSizeHintAttr(const WorkGroupSizeHintAttr *A) {
1173
    const auto *SA = cast<WorkGroupSizeHintAttr>(A); (void)SA;
1174
    OS << " " << SA->getXDim();
1175
    OS << " " << SA->getYDim();
1176
    OS << " " << SA->getZDim();
1177
  }
1178
  void VisitXRayInstrumentAttr(const XRayInstrumentAttr *A) {
1179
    OS << " " << A->getSpelling();
1180
  }
1181
  void VisitXRayLogArgsAttr(const XRayLogArgsAttr *A) {
1182
    const auto *SA = cast<XRayLogArgsAttr>(A); (void)SA;
1183
    OS << " " << SA->getArgumentCount();
1184
  }
1185
  void VisitZeroCallUsedRegsAttr(const ZeroCallUsedRegsAttr *A) {
1186
    const auto *SA = cast<ZeroCallUsedRegsAttr>(A); (void)SA;
1187
    switch(SA->getZeroCallUsedRegs()) {
1188
    case ZeroCallUsedRegsAttr::Skip:
1189
      OS << " Skip";
1190
      break;
1191
    case ZeroCallUsedRegsAttr::UsedGPRArg:
1192
      OS << " UsedGPRArg";
1193
      break;
1194
    case ZeroCallUsedRegsAttr::UsedGPR:
1195
      OS << " UsedGPR";
1196
      break;
1197
    case ZeroCallUsedRegsAttr::UsedArg:
1198
      OS << " UsedArg";
1199
      break;
1200
    case ZeroCallUsedRegsAttr::Used:
1201
      OS << " Used";
1202
      break;
1203
    case ZeroCallUsedRegsAttr::AllGPRArg:
1204
      OS << " AllGPRArg";
1205
      break;
1206
    case ZeroCallUsedRegsAttr::AllGPR:
1207
      OS << " AllGPR";
1208
      break;
1209
    case ZeroCallUsedRegsAttr::AllArg:
1210
      OS << " AllArg";
1211
      break;
1212
    case ZeroCallUsedRegsAttr::All:
1213
      OS << " All";
1214
      break;
1215
    }
1216
  }