LLVM  9.0.0svn
Dwarf.cpp
Go to the documentation of this file.
1 //===-- llvm/BinaryFormat/Dwarf.cpp - Dwarf Framework ------------*- C++-*-===//
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 support for generic dwarf information.
10 //
11 //===----------------------------------------------------------------------===//
12 
14 #include "llvm/ADT/StringSwitch.h"
15 #include "llvm/ADT/Triple.h"
17 
18 using namespace llvm;
19 using namespace dwarf;
20 
22  switch (Tag) {
23  default:
24  return StringRef();
25 #define HANDLE_DW_TAG(ID, NAME, VERSION, VENDOR) \
26  case DW_TAG_##NAME: \
27  return "DW_TAG_" #NAME;
28 #include "llvm/BinaryFormat/Dwarf.def"
29  }
30 }
31 
34 #define HANDLE_DW_TAG(ID, NAME, VERSION, VENDOR) \
35  .Case("DW_TAG_" #NAME, DW_TAG_##NAME)
36 #include "llvm/BinaryFormat/Dwarf.def"
37  .Default(DW_TAG_invalid);
38 }
39 
41  switch (Tag) {
42  default:
43  return 0;
44 #define HANDLE_DW_TAG(ID, NAME, VERSION, VENDOR) \
45  case DW_TAG_##NAME: \
46  return VERSION;
47 #include "llvm/BinaryFormat/Dwarf.def"
48  }
49 }
50 
52  switch (Tag) {
53  default:
54  return 0;
55 #define HANDLE_DW_TAG(ID, NAME, VERSION, VENDOR) \
56  case DW_TAG_##NAME: \
57  return DWARF_VENDOR_##VENDOR;
58 #include "llvm/BinaryFormat/Dwarf.def"
59  }
60 }
61 
63  switch (Children) {
64  case DW_CHILDREN_no:
65  return "DW_CHILDREN_no";
66  case DW_CHILDREN_yes:
67  return "DW_CHILDREN_yes";
68  }
69  return StringRef();
70 }
71 
73  switch (Attribute) {
74  default:
75  return StringRef();
76 #define HANDLE_DW_AT(ID, NAME, VERSION, VENDOR) \
77  case DW_AT_##NAME: \
78  return "DW_AT_" #NAME;
79 #include "llvm/BinaryFormat/Dwarf.def"
80  }
81 }
82 
84  switch (Attribute) {
85  default:
86  return 0;
87 #define HANDLE_DW_AT(ID, NAME, VERSION, VENDOR) \
88  case DW_AT_##NAME: \
89  return VERSION;
90 #include "llvm/BinaryFormat/Dwarf.def"
91  }
92 }
93 
95  switch (Attribute) {
96  default:
97  return 0;
98 #define HANDLE_DW_AT(ID, NAME, VERSION, VENDOR) \
99  case DW_AT_##NAME: \
100  return DWARF_VENDOR_##VENDOR;
101 #include "llvm/BinaryFormat/Dwarf.def"
102  }
103 }
104 
106  switch (Encoding) {
107  default:
108  return StringRef();
109 #define HANDLE_DW_FORM(ID, NAME, VERSION, VENDOR) \
110  case DW_FORM_##NAME: \
111  return "DW_FORM_" #NAME;
112 #include "llvm/BinaryFormat/Dwarf.def"
113  }
114 }
115 
117  switch (Form) {
118  default:
119  return 0;
120 #define HANDLE_DW_FORM(ID, NAME, VERSION, VENDOR) \
121  case DW_FORM_##NAME: \
122  return VERSION;
123 #include "llvm/BinaryFormat/Dwarf.def"
124  }
125 }
126 
128  switch (Form) {
129  default:
130  return 0;
131 #define HANDLE_DW_FORM(ID, NAME, VERSION, VENDOR) \
132  case DW_FORM_##NAME: \
133  return DWARF_VENDOR_##VENDOR;
134 #include "llvm/BinaryFormat/Dwarf.def"
135  }
136 }
137 
139  switch (Encoding) {
140  default:
141  return StringRef();
142 #define HANDLE_DW_OP(ID, NAME, VERSION, VENDOR) \
143  case DW_OP_##NAME: \
144  return "DW_OP_" #NAME;
145 #include "llvm/BinaryFormat/Dwarf.def"
146  case DW_OP_LLVM_convert:
147  return "DW_OP_LLVM_convert";
148  case DW_OP_LLVM_fragment:
149  return "DW_OP_LLVM_fragment";
150  }
151 }
152 
155 #define HANDLE_DW_OP(ID, NAME, VERSION, VENDOR) \
156  .Case("DW_OP_" #NAME, DW_OP_##NAME)
157 #include "llvm/BinaryFormat/Dwarf.def"
158  .Case("DW_OP_LLVM_convert", DW_OP_LLVM_convert)
159  .Case("DW_OP_LLVM_fragment", DW_OP_LLVM_fragment)
160  .Default(0);
161 }
162 
164  switch (Op) {
165  default:
166  return 0;
167 #define HANDLE_DW_OP(ID, NAME, VERSION, VENDOR) \
168  case DW_OP_##NAME: \
169  return VERSION;
170 #include "llvm/BinaryFormat/Dwarf.def"
171  }
172 }
173 
175  switch (Op) {
176  default:
177  return 0;
178 #define HANDLE_DW_OP(ID, NAME, VERSION, VENDOR) \
179  case DW_OP_##NAME: \
180  return DWARF_VENDOR_##VENDOR;
181 #include "llvm/BinaryFormat/Dwarf.def"
182  }
183 }
184 
186  switch (Encoding) {
187  default:
188  return StringRef();
189 #define HANDLE_DW_ATE(ID, NAME, VERSION, VENDOR) \
190  case DW_ATE_##NAME: \
191  return "DW_ATE_" #NAME;
192 #include "llvm/BinaryFormat/Dwarf.def"
193  }
194 }
195 
197  return StringSwitch<unsigned>(EncodingString)
198 #define HANDLE_DW_ATE(ID, NAME, VERSION, VENDOR) \
199  .Case("DW_ATE_" #NAME, DW_ATE_##NAME)
200 #include "llvm/BinaryFormat/Dwarf.def"
201  .Default(0);
202 }
203 
205  switch (ATE) {
206  default:
207  return 0;
208 #define HANDLE_DW_ATE(ID, NAME, VERSION, VENDOR) \
209  case DW_ATE_##NAME: \
210  return VERSION;
211 #include "llvm/BinaryFormat/Dwarf.def"
212  }
213 }
214 
216  switch (ATE) {
217  default:
218  return 0;
219 #define HANDLE_DW_ATE(ID, NAME, VERSION, VENDOR) \
220  case DW_ATE_##NAME: \
221  return DWARF_VENDOR_##VENDOR;
222 #include "llvm/BinaryFormat/Dwarf.def"
223  }
224 }
225 
227  switch (Sign) {
228  case DW_DS_unsigned:
229  return "DW_DS_unsigned";
231  return "DW_DS_leading_overpunch";
233  return "DW_DS_trailing_overpunch";
235  return "DW_DS_leading_separate";
237  return "DW_DS_trailing_separate";
238  }
239  return StringRef();
240 }
241 
243  switch (Endian) {
244  case DW_END_default:
245  return "DW_END_default";
246  case DW_END_big:
247  return "DW_END_big";
248  case DW_END_little:
249  return "DW_END_little";
250  case DW_END_lo_user:
251  return "DW_END_lo_user";
252  case DW_END_hi_user:
253  return "DW_END_hi_user";
254  }
255  return StringRef();
256 }
257 
259  switch (Access) {
260  // Accessibility codes
261  case DW_ACCESS_public:
262  return "DW_ACCESS_public";
263  case DW_ACCESS_protected:
264  return "DW_ACCESS_protected";
265  case DW_ACCESS_private:
266  return "DW_ACCESS_private";
267  }
268  return StringRef();
269 }
270 
272  switch (Visibility) {
273  case DW_VIS_local:
274  return "DW_VIS_local";
275  case DW_VIS_exported:
276  return "DW_VIS_exported";
277  case DW_VIS_qualified:
278  return "DW_VIS_qualified";
279  }
280  return StringRef();
281 }
282 
284  switch (Virtuality) {
285  default:
286  return StringRef();
287 #define HANDLE_DW_VIRTUALITY(ID, NAME) \
288  case DW_VIRTUALITY_##NAME: \
289  return "DW_VIRTUALITY_" #NAME;
290 #include "llvm/BinaryFormat/Dwarf.def"
291  }
292 }
293 
296 #define HANDLE_DW_VIRTUALITY(ID, NAME) \
297  .Case("DW_VIRTUALITY_" #NAME, DW_VIRTUALITY_##NAME)
298 #include "llvm/BinaryFormat/Dwarf.def"
299  .Default(DW_VIRTUALITY_invalid);
300 }
301 
303  switch (Language) {
304  default:
305  return StringRef();
306 #define HANDLE_DW_LANG(ID, NAME, LOWER_BOUND, VERSION, VENDOR) \
307  case DW_LANG_##NAME: \
308  return "DW_LANG_" #NAME;
309 #include "llvm/BinaryFormat/Dwarf.def"
310  }
311 }
312 
315 #define HANDLE_DW_LANG(ID, NAME, LOWER_BOUND, VERSION, VENDOR) \
316  .Case("DW_LANG_" #NAME, DW_LANG_##NAME)
317 #include "llvm/BinaryFormat/Dwarf.def"
318  .Default(0);
319 }
320 
322  switch (Lang) {
323  default:
324  return 0;
325 #define HANDLE_DW_LANG(ID, NAME, LOWER_BOUND, VERSION, VENDOR) \
326  case DW_LANG_##NAME: \
327  return VERSION;
328 #include "llvm/BinaryFormat/Dwarf.def"
329  }
330 }
331 
333  switch (Lang) {
334  default:
335  return 0;
336 #define HANDLE_DW_LANG(ID, NAME, LOWER_BOUND, VERSION, VENDOR) \
337  case DW_LANG_##NAME: \
338  return DWARF_VENDOR_##VENDOR;
339 #include "llvm/BinaryFormat/Dwarf.def"
340  }
341 }
342 
344  switch (Lang) {
345  default:
346  return None;
347 #define HANDLE_DW_LANG(ID, NAME, LOWER_BOUND, VERSION, VENDOR) \
348  case DW_LANG_##NAME: \
349  return LOWER_BOUND;
350 #include "llvm/BinaryFormat/Dwarf.def"
351  }
352 }
353 
355  switch (Case) {
357  return "DW_ID_case_sensitive";
358  case DW_ID_up_case:
359  return "DW_ID_up_case";
360  case DW_ID_down_case:
361  return "DW_ID_down_case";
363  return "DW_ID_case_insensitive";
364  }
365  return StringRef();
366 }
367 
369  switch (CC) {
370  default:
371  return StringRef();
372 #define HANDLE_DW_CC(ID, NAME) \
373  case DW_CC_##NAME: \
374  return "DW_CC_" #NAME;
375 #include "llvm/BinaryFormat/Dwarf.def"
376  }
377 }
378 
380  return StringSwitch<unsigned>(CCString)
381 #define HANDLE_DW_CC(ID, NAME) .Case("DW_CC_" #NAME, DW_CC_##NAME)
382 #include "llvm/BinaryFormat/Dwarf.def"
383  .Default(0);
384 }
385 
387  switch (Code) {
388  case DW_INL_not_inlined:
389  return "DW_INL_not_inlined";
390  case DW_INL_inlined:
391  return "DW_INL_inlined";
393  return "DW_INL_declared_not_inlined";
395  return "DW_INL_declared_inlined";
396  }
397  return StringRef();
398 }
399 
401  switch (Order) {
402  case DW_ORD_row_major:
403  return "DW_ORD_row_major";
404  case DW_ORD_col_major:
405  return "DW_ORD_col_major";
406  }
407  return StringRef();
408 }
409 
411  switch (Standard) {
412  default:
413  return StringRef();
414 #define HANDLE_DW_LNS(ID, NAME) \
415  case DW_LNS_##NAME: \
416  return "DW_LNS_" #NAME;
417 #include "llvm/BinaryFormat/Dwarf.def"
418  }
419 }
420 
422  switch (Encoding) {
423  default:
424  return StringRef();
425 #define HANDLE_DW_LNE(ID, NAME) \
426  case DW_LNE_##NAME: \
427  return "DW_LNE_" #NAME;
428 #include "llvm/BinaryFormat/Dwarf.def"
429  }
430 }
431 
433  switch (Encoding) {
434  // Macinfo Type Encodings
435  case DW_MACINFO_define:
436  return "DW_MACINFO_define";
437  case DW_MACINFO_undef:
438  return "DW_MACINFO_undef";
440  return "DW_MACINFO_start_file";
441  case DW_MACINFO_end_file:
442  return "DW_MACINFO_end_file";
444  return "DW_MACINFO_vendor_ext";
445  case DW_MACINFO_invalid:
446  return "DW_MACINFO_invalid";
447  }
448  return StringRef();
449 }
450 
453  .Case("DW_MACINFO_define", DW_MACINFO_define)
454  .Case("DW_MACINFO_undef", DW_MACINFO_undef)
455  .Case("DW_MACINFO_start_file", DW_MACINFO_start_file)
456  .Case("DW_MACINFO_end_file", DW_MACINFO_end_file)
457  .Case("DW_MACINFO_vendor_ext", DW_MACINFO_vendor_ext)
459 }
460 
462  switch (Encoding) {
463  default:
464  return StringRef();
465 #define HANDLE_DW_RLE(ID, NAME) \
466  case DW_RLE_##NAME: \
467  return "DW_RLE_" #NAME;
468 #include "llvm/BinaryFormat/Dwarf.def"
469  }
470 }
471 
473  Triple::ArchType Arch) {
474  assert(Arch != llvm::Triple::ArchType::UnknownArch);
475 #define SELECT_AARCH64 (Arch == llvm::Triple::aarch64_be || Arch == llvm::Triple::aarch64)
476 #define SELECT_MIPS64 Arch == llvm::Triple::mips64
477 #define SELECT_SPARC (Arch == llvm::Triple::sparc || Arch == llvm::Triple::sparcv9)
478 #define SELECT_X86 (Arch == llvm::Triple::x86 || Arch == llvm::Triple::x86_64)
479 #define HANDLE_DW_CFA(ID, NAME)
480 #define HANDLE_DW_CFA_PRED(ID, NAME, PRED) \
481  if (ID == Encoding && PRED) \
482  return "DW_CFA_" #NAME;
483 #include "llvm/BinaryFormat/Dwarf.def"
484 
485  switch (Encoding) {
486  default:
487  return StringRef();
488 #define HANDLE_DW_CFA_PRED(ID, NAME, PRED)
489 #define HANDLE_DW_CFA(ID, NAME) \
490  case DW_CFA_##NAME: \
491  return "DW_CFA_" #NAME;
492 #include "llvm/BinaryFormat/Dwarf.def"
493 
494 #undef SELECT_X86
495 #undef SELECT_SPARC
496 #undef SELECT_MIPS64
497 #undef SELECT_AARCH64
498  }
499 }
500 
502  switch (Prop) {
503  default:
504  return StringRef();
505 #define HANDLE_DW_APPLE_PROPERTY(ID, NAME) \
506  case DW_APPLE_PROPERTY_##NAME: \
507  return "DW_APPLE_PROPERTY_" #NAME;
508 #include "llvm/BinaryFormat/Dwarf.def"
509  }
510 }
511 
513  switch (UT) {
514  default:
515  return StringRef();
516 #define HANDLE_DW_UT(ID, NAME) \
517  case DW_UT_##NAME: \
518  return "DW_UT_" #NAME;
519 #include "llvm/BinaryFormat/Dwarf.def"
520  }
521 }
522 
524  switch (AT) {
525  case dwarf::DW_ATOM_null:
526  return "DW_ATOM_null";
528  return "DW_ATOM_die_offset";
529  case DW_ATOM_cu_offset:
530  return "DW_ATOM_cu_offset";
531  case DW_ATOM_die_tag:
532  return "DW_ATOM_die_tag";
533  case DW_ATOM_type_flags:
535  return "DW_ATOM_type_flags";
537  return "DW_ATOM_qual_name_hash";
538  }
539  return StringRef();
540 }
541 
543  switch (Kind) {
544  case GIEK_NONE:
545  return "NONE";
546  case GIEK_TYPE:
547  return "TYPE";
548  case GIEK_VARIABLE:
549  return "VARIABLE";
550  case GIEK_FUNCTION:
551  return "FUNCTION";
552  case GIEK_OTHER:
553  return "OTHER";
554  case GIEK_UNUSED5:
555  return "UNUSED5";
556  case GIEK_UNUSED6:
557  return "UNUSED6";
558  case GIEK_UNUSED7:
559  return "UNUSED7";
560  }
561  llvm_unreachable("Unknown GDBIndexEntryKind value");
562 }
563 
564 StringRef
566  switch (Linkage) {
567  case GIEL_EXTERNAL:
568  return "EXTERNAL";
569  case GIEL_STATIC:
570  return "STATIC";
571  }
572  llvm_unreachable("Unknown GDBIndexEntryLinkage value");
573 }
574 
575 StringRef llvm::dwarf::AttributeValueString(uint16_t Attr, unsigned Val) {
576  switch (Attr) {
577  case DW_AT_accessibility:
578  return AccessibilityString(Val);
579  case DW_AT_virtuality:
580  return VirtualityString(Val);
581  case DW_AT_language:
582  return LanguageString(Val);
583  case DW_AT_encoding:
584  return AttributeEncodingString(Val);
585  case DW_AT_decimal_sign:
586  return DecimalSignString(Val);
587  case DW_AT_endianity:
588  return EndianityString(Val);
589  case DW_AT_visibility:
590  return VisibilityString(Val);
591  case DW_AT_identifier_case:
592  return CaseString(Val);
593  case DW_AT_calling_convention:
594  return ConventionString(Val);
595  case DW_AT_inline:
596  return InlineCodeString(Val);
597  case DW_AT_ordering:
598  return ArrayOrderString(Val);
599  case DW_AT_APPLE_runtime_class:
600  return LanguageString(Val);
601  }
602 
603  return StringRef();
604 }
605 
606 StringRef llvm::dwarf::AtomValueString(uint16_t Atom, unsigned Val) {
607  switch (Atom) {
608  case DW_ATOM_null:
609  return "NULL";
610  case DW_ATOM_die_tag:
611  return TagString(Val);
612  }
613 
614  return StringRef();
615 }
616 
618  switch (Idx) {
619  default:
620  return StringRef();
621 #define HANDLE_DW_IDX(ID, NAME) \
622  case DW_IDX_##NAME: \
623  return "DW_IDX_" #NAME;
624 #include "llvm/BinaryFormat/Dwarf.def"
625  }
626 }
627 
629  FormParams Params) {
630  switch (Form) {
631  case DW_FORM_addr:
632  if (Params)
633  return Params.AddrSize;
634  return None;
635 
636  case DW_FORM_block: // ULEB128 length L followed by L bytes.
637  case DW_FORM_block1: // 1 byte length L followed by L bytes.
638  case DW_FORM_block2: // 2 byte length L followed by L bytes.
639  case DW_FORM_block4: // 4 byte length L followed by L bytes.
640  case DW_FORM_string: // C-string with null terminator.
641  case DW_FORM_sdata: // SLEB128.
642  case DW_FORM_udata: // ULEB128.
643  case DW_FORM_ref_udata: // ULEB128.
644  case DW_FORM_indirect: // ULEB128.
645  case DW_FORM_exprloc: // ULEB128 length L followed by L bytes.
646  case DW_FORM_strx: // ULEB128.
647  case DW_FORM_addrx: // ULEB128.
648  case DW_FORM_loclistx: // ULEB128.
649  case DW_FORM_rnglistx: // ULEB128.
650  case DW_FORM_GNU_addr_index: // ULEB128.
651  case DW_FORM_GNU_str_index: // ULEB128.
652  return None;
653 
654  case DW_FORM_ref_addr:
655  if (Params)
656  return Params.getRefAddrByteSize();
657  return None;
658 
659  case DW_FORM_flag:
660  case DW_FORM_data1:
661  case DW_FORM_ref1:
662  case DW_FORM_strx1:
663  case DW_FORM_addrx1:
664  return 1;
665 
666  case DW_FORM_data2:
667  case DW_FORM_ref2:
668  case DW_FORM_strx2:
669  case DW_FORM_addrx2:
670  return 2;
671 
672  case DW_FORM_strx3:
673  return 3;
674 
675  case DW_FORM_data4:
676  case DW_FORM_ref4:
677  case DW_FORM_ref_sup4:
678  case DW_FORM_strx4:
679  case DW_FORM_addrx4:
680  return 4;
681 
682  case DW_FORM_strp:
683  case DW_FORM_GNU_ref_alt:
684  case DW_FORM_GNU_strp_alt:
685  case DW_FORM_line_strp:
686  case DW_FORM_sec_offset:
687  case DW_FORM_strp_sup:
688  if (Params)
689  return Params.getDwarfOffsetByteSize();
690  return None;
691 
692  case DW_FORM_data8:
693  case DW_FORM_ref8:
694  case DW_FORM_ref_sig8:
695  case DW_FORM_ref_sup8:
696  return 8;
697 
698  case DW_FORM_flag_present:
699  return 0;
700 
701  case DW_FORM_data16:
702  return 16;
703 
704  case DW_FORM_implicit_const:
705  // The implicit value is stored in the abbreviation as a SLEB128, and
706  // there no data in debug info.
707  return 0;
708 
709  default:
710  break;
711  }
712  return None;
713 }
714 
716  bool ExtensionsOk) {
717  if (FormVendor(F) == DWARF_VENDOR_DWARF) {
718  unsigned FV = FormVersion(F);
719  return FV > 0 && FV <= Version;
720  }
721  return ExtensionsOk;
722 }
723 
725 constexpr char llvm::dwarf::EnumTraits<Form>::Type[];
726 constexpr char llvm::dwarf::EnumTraits<Index>::Type[];
727 constexpr char llvm::dwarf::EnumTraits<Tag>::Type[];
const NoneType None
Definition: None.h:23
#define HANDLE_DW_TAG(ID, NAME, VERSION, VENDOR)
LocationAtom
Definition: Dwarf.h:127
unsigned FormVersion(Form F)
Definition: Dwarf.cpp:116
StringRef ApplePropertyString(unsigned)
Definition: Dwarf.cpp:501
A helper struct providing information about the byte size of DW_FORM values that vary in size dependi...
Definition: Dwarf.h:499
StringRef IndexString(unsigned Idx)
Definition: Dwarf.cpp:617
This class represents lattice values for constants.
Definition: AllocatorList.h:23
StringRef AtomTypeString(unsigned Atom)
Definition: Dwarf.cpp:523
unsigned FormVendor(Form F)
Definition: Dwarf.cpp:127
#define HANDLE_DW_OP(ID, NAME, VERSION, VENDOR)
Attribute
Attributes.
Definition: Dwarf.h:114
StringRef LNExtendedString(unsigned Encoding)
Definition: Dwarf.cpp:421
StringRef LNStandardString(unsigned Standard)
Definition: Dwarf.cpp:410
unsigned TagVendor(Tag T)
Definition: Dwarf.cpp:51
uint8_t getRefAddrByteSize() const
The definition of the size of form DW_FORM_ref_addr depends on the version.
Definition: Dwarf.h:507
Only used in LLVM metadata.
Definition: Dwarf.h:133
GDBIndexEntryKind
Definition: Dwarf.h:396
F(f)
ELFYAML::ELF_STV Visibility
Definition: ELFYAML.cpp:850
Optional< unsigned > LanguageLowerBound(SourceLanguage L)
Definition: Dwarf.cpp:343
unsigned getVirtuality(StringRef VirtualityString)
Definition: Dwarf.cpp:294
StringSwitch & Case(StringLiteral S, T Value)
Definition: StringSwitch.h:67
constexpr char Language[]
Key for Kernel::Metadata::mLanguage.
StringRef CallFrameString(unsigned Encoding, Triple::ArchType Arch)
Definition: Dwarf.cpp:472
#define HANDLE_DW_ATE(ID, NAME, VERSION, VENDOR)
unsigned TagVersion(Tag T)
Definition: Dwarf.cpp:40
StringRef FormEncodingString(unsigned Encoding)
Definition: Dwarf.cpp:105
unsigned AttributeVendor(Attribute A)
Definition: Dwarf.cpp:94
LLVM_NODISCARD R Default(T Value)
Definition: StringSwitch.h:181
Only used in LLVM metadata.
Definition: Dwarf.h:132
unsigned LanguageVendor(SourceLanguage L)
Definition: Dwarf.cpp:332
StringRef AttributeString(unsigned Attribute)
Definition: Dwarf.cpp:72
StringRef LanguageString(unsigned Language)
Definition: Dwarf.cpp:302
StringRef DecimalSignString(unsigned Sign)
Definition: Dwarf.cpp:226
StringRef AttributeValueString(uint16_t Attr, unsigned Val)
Returns the symbolic string representing Val when used as a value for attribute Attr.
Definition: Dwarf.cpp:575
unsigned LanguageVersion(SourceLanguage L)
Definition: Dwarf.cpp:321
A switch()-like statement whose cases are string literals.
Definition: StringSwitch.h:42
StringRef GDBIndexEntryKindString(GDBIndexEntryKind Kind)
Definition: Dwarf.cpp:542
#define HANDLE_DW_VIRTUALITY(ID, NAME)
StringRef AccessibilityString(unsigned Access)
Definition: Dwarf.cpp:258
StringRef EndianityString(unsigned Endian)
Definition: Dwarf.cpp:242
StringRef AttributeEncodingString(unsigned Encoding)
Definition: Dwarf.cpp:185
unsigned OperationVendor(LocationAtom O)
Definition: Dwarf.cpp:174
unsigned getCallingConvention(StringRef LanguageString)
Definition: Dwarf.cpp:379
SourceLanguage
Definition: Dwarf.h:186
unsigned getOperationEncoding(StringRef OperationEncodingString)
Definition: Dwarf.cpp:153
StringRef ArrayOrderString(unsigned Order)
Definition: Dwarf.cpp:400
unsigned OperationVersion(LocationAtom O)
Definition: Dwarf.cpp:163
#define HANDLE_DW_CC(ID, NAME)
StringRef GDBIndexEntryLinkageString(GDBIndexEntryLinkage Linkage)
Definition: Dwarf.cpp:565
unsigned getLanguage(StringRef LanguageString)
Definition: Dwarf.cpp:313
StringRef RangeListEncodingString(unsigned Encoding)
Definition: Dwarf.cpp:461
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
StringRef VirtualityString(unsigned Virtuality)
Definition: Dwarf.cpp:283
StringRef OperationEncodingString(unsigned Encoding)
Definition: Dwarf.cpp:138
unsigned getTag(StringRef TagString)
Definition: Dwarf.cpp:32
StringRef CaseString(unsigned Case)
Definition: Dwarf.cpp:354
unsigned AttributeVersion(Attribute A)
Definition: Dwarf.cpp:83
unsigned AttributeEncodingVersion(TypeKind E)
Definition: Dwarf.cpp:204
StringRef VisibilityString(unsigned Visibility)
Definition: Dwarf.cpp:271
This file contains constants used for implementing Dwarf debug support.
StringRef UnitTypeString(unsigned)
Definition: Dwarf.cpp:512
StringRef AtomValueString(uint16_t Atom, unsigned Val)
Returns the symbolic string representing Val when used as a value for atom Atom.
Definition: Dwarf.cpp:606
Optional< uint8_t > getFixedFormByteSize(dwarf::Form Form, FormParams Params)
Get the fixed byte size for a given form.
Definition: Dwarf.cpp:628
StringRef TagString(unsigned Tag)
Definition: Dwarf.cpp:21
unsigned AttributeEncodingVendor(TypeKind E)
Definition: Dwarf.cpp:215
#define HANDLE_DW_LANG(ID, NAME, LOWER_BOUND, VERSION, VENDOR)
StringRef InlineCodeString(unsigned Code)
Definition: Dwarf.cpp:386
StringRef ConventionString(unsigned Convention)
Definition: Dwarf.cpp:368
unsigned getMacinfo(StringRef MacinfoString)
Definition: Dwarf.cpp:451
StringRef ChildrenString(unsigned Children)
Definition: Dwarf.cpp:62
bool isValidFormForVersion(Form F, unsigned Version, bool ExtensionsOk=true)
Tells whether the specified form is defined in the specified version, or is an extension if extension...
Definition: Dwarf.cpp:715
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
unsigned getAttributeEncoding(StringRef EncodingString)
Definition: Dwarf.cpp:196
GDBIndexEntryLinkage
Definition: Dwarf.h:407
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:48
StringRef MacinfoString(unsigned Encoding)
Definition: Dwarf.cpp:432
Marker as the end of a list of atoms.
Definition: Dwarf.h:374
uint8_t getDwarfOffsetByteSize() const
The size of a reference is determined by the DWARF 32/64-bit format.
Definition: Dwarf.h:514
const uint64_t Version
Definition: InstrProf.h:984