LLVM  10.0.0svn
Dwarf.h
Go to the documentation of this file.
1 //===-- llvm/BinaryFormat/Dwarf.h ---Dwarf Constants-------------*- 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 /// \file
10 /// This file contains constants used for implementing Dwarf
11 /// debug support.
12 ///
13 /// For details on the Dwarf specfication see the latest DWARF Debugging
14 /// Information Format standard document on http://www.dwarfstd.org. This
15 /// file often includes support for non-released standard features.
16 //
17 //===----------------------------------------------------------------------===//
18 
19 #ifndef LLVM_BINARYFORMAT_DWARF_H
20 #define LLVM_BINARYFORMAT_DWARF_H
21 
22 #include "llvm/ADT/Optional.h"
23 #include "llvm/Support/Compiler.h"
24 #include "llvm/Support/DataTypes.h"
26 #include "llvm/Support/Format.h"
28 #include "llvm/ADT/Triple.h"
29 
30 namespace llvm {
31 class StringRef;
32 
33 namespace dwarf {
34 
35 //===----------------------------------------------------------------------===//
36 // DWARF constants as gleaned from the DWARF Debugging Information Format V.5
37 // reference manual http://www.dwarfstd.org/.
38 //
39 
40 // Do not mix the following two enumerations sets. DW_TAG_invalid changes the
41 // enumeration base type.
42 
44  // LLVM mock tags (see also llvm/BinaryFormat/Dwarf.def).
45  DW_TAG_invalid = ~0U, // Tag for invalid results.
46  DW_VIRTUALITY_invalid = ~0U, // Virtuality for invalid results.
47  DW_MACINFO_invalid = ~0U, // Macinfo type for invalid results.
48 
49  // Special values for an initial length field.
50  DW_LENGTH_lo_reserved = 0xfffffff0, // Lower bound of the reserved range.
51  DW_LENGTH_DWARF64 = 0xffffffff, // Indicator of 64-bit DWARF format.
52  DW_LENGTH_hi_reserved = 0xffffffff, // Upper bound of the reserved range.
53 
54  // Other constants.
55  DWARF_VERSION = 4, // Default dwarf version we output.
56  DW_PUBTYPES_VERSION = 2, // Section version number for .debug_pubtypes.
57  DW_PUBNAMES_VERSION = 2, // Section version number for .debug_pubnames.
58  DW_ARANGES_VERSION = 2, // Section version number for .debug_aranges.
59  // Identifiers we use to distinguish vendor extensions.
60  DWARF_VENDOR_DWARF = 0, // Defined in v2 or later of the DWARF standard.
67 };
68 
69 /// Constants that define the DWARF format as 32 or 64 bit.
70 enum DwarfFormat : uint8_t { DWARF32, DWARF64 };
71 
72 /// Special ID values that distinguish a CIE from a FDE in DWARF CFI.
73 /// Not inside an enum because a 64-bit value is needed.
74 /// @{
75 const uint32_t DW_CIE_ID = UINT32_MAX;
76 const uint64_t DW64_CIE_ID = UINT64_MAX;
77 /// @}
78 
79 /// Identifier of an invalid DIE offset in the .debug_info section.
80 const uint32_t DW_INVALID_OFFSET = UINT32_MAX;
81 
82 enum Tag : uint16_t {
83 #define HANDLE_DW_TAG(ID, NAME, VERSION, VENDOR, KIND) DW_TAG_##NAME = ID,
84 #include "llvm/BinaryFormat/Dwarf.def"
85  DW_TAG_lo_user = 0x4080,
86  DW_TAG_hi_user = 0xffff,
87  DW_TAG_user_base = 0x1000 ///< Recommended base for user tags.
88 };
89 
90 inline bool isType(Tag T) {
91  switch (T) {
92  default:
93  return false;
94 #define HANDLE_DW_TAG(ID, NAME, VERSION, VENDOR, KIND) \
95  case DW_TAG_##NAME: \
96  return (KIND == DW_KIND_TYPE);
97 #include "llvm/BinaryFormat/Dwarf.def"
98  }
99 }
100 
101 /// Attributes.
102 enum Attribute : uint16_t {
103 #define HANDLE_DW_AT(ID, NAME, VERSION, VENDOR) DW_AT_##NAME = ID,
104 #include "llvm/BinaryFormat/Dwarf.def"
105  DW_AT_lo_user = 0x2000,
106  DW_AT_hi_user = 0x3fff,
107 };
108 
109 enum Form : uint16_t {
110 #define HANDLE_DW_FORM(ID, NAME, VERSION, VENDOR) DW_FORM_##NAME = ID,
111 #include "llvm/BinaryFormat/Dwarf.def"
112  DW_FORM_lo_user = 0x1f00, ///< Not specified by DWARF.
113 };
114 
116 #define HANDLE_DW_OP(ID, NAME, VERSION, VENDOR) DW_OP_##NAME = ID,
117 #include "llvm/BinaryFormat/Dwarf.def"
120  DW_OP_LLVM_fragment = 0x1000, ///< Only used in LLVM metadata.
121  DW_OP_LLVM_convert = 0x1001, ///< Only used in LLVM metadata.
122  DW_OP_LLVM_tag_offset = 0x1002, ///< Only used in LLVM metadata.
123 };
124 
125 enum TypeKind : uint8_t {
126 #define HANDLE_DW_ATE(ID, NAME, VERSION, VENDOR) DW_ATE_##NAME = ID,
127 #include "llvm/BinaryFormat/Dwarf.def"
130 };
131 
133  // Decimal sign attribute values
139 };
140 
142  // Endianity attribute values
143 #define HANDLE_DW_END(ID, NAME) DW_END_##NAME = ID,
144 #include "llvm/BinaryFormat/Dwarf.def"
147 };
148 
150  // Accessibility codes
154 };
155 
157  // Visibility codes
158  DW_VIS_local = 0x01,
161 };
162 
164 #define HANDLE_DW_VIRTUALITY(ID, NAME) DW_VIRTUALITY_##NAME = ID,
165 #include "llvm/BinaryFormat/Dwarf.def"
167 };
168 
170 #define HANDLE_DW_DEFAULTED(ID, NAME) DW_DEFAULTED_##NAME = ID,
171 #include "llvm/BinaryFormat/Dwarf.def"
173 };
174 
176 #define HANDLE_DW_LANG(ID, NAME, LOWER_BOUND, VERSION, VENDOR) \
177  DW_LANG_##NAME = ID,
178 #include "llvm/BinaryFormat/Dwarf.def"
179  DW_LANG_lo_user = 0x8000,
181 };
182 
184  // Identifier case codes
189 };
190 
192 // Calling convention codes
193 #define HANDLE_DW_CC(ID, NAME) DW_CC_##NAME = ID,
194 #include "llvm/BinaryFormat/Dwarf.def"
197 };
198 
200  // Inline codes
205 };
206 
208  // Array ordering
211 };
212 
214  // Discriminant descriptor values
215  DW_DSC_label = 0x00,
217 };
218 
219 /// Line Number Standard Opcode Encodings.
220 enum LineNumberOps : uint8_t {
221 #define HANDLE_DW_LNS(ID, NAME) DW_LNS_##NAME = ID,
222 #include "llvm/BinaryFormat/Dwarf.def"
223 };
224 
225 /// Line Number Extended Opcode Encodings.
227 #define HANDLE_DW_LNE(ID, NAME) DW_LNE_##NAME = ID,
228 #include "llvm/BinaryFormat/Dwarf.def"
231 };
232 
234 #define HANDLE_DW_LNCT(ID, NAME) DW_LNCT_##NAME = ID,
235 #include "llvm/BinaryFormat/Dwarf.def"
236  DW_LNCT_lo_user = 0x2000,
237  DW_LNCT_hi_user = 0x3fff,
238 };
239 
241  // Macinfo Type Encodings
247 };
248 
249 /// DWARF v5 macro information entry type encodings.
251 #define HANDLE_DW_MACRO(ID, NAME) DW_MACRO_##NAME = ID,
252 #include "llvm/BinaryFormat/Dwarf.def"
255 };
256 
257 /// DWARF v5 range list entry encoding values.
259 #define HANDLE_DW_RLE(ID, NAME) DW_RLE_##NAME = ID,
260 #include "llvm/BinaryFormat/Dwarf.def"
261 };
262 
263 /// Call frame instruction encodings.
265 #define HANDLE_DW_CFA(ID, NAME) DW_CFA_##NAME = ID,
266 #define HANDLE_DW_CFA_PRED(ID, NAME, ARCH) DW_CFA_##NAME = ID,
267 #include "llvm/BinaryFormat/Dwarf.def"
269 
272 };
273 
274 enum Constants {
275  // Children flag
278 
296 };
297 
298 /// Constants for location lists in DWARF v5.
299 enum LocationListEntry : unsigned char {
309 };
310 
311 /// Constants for the DW_APPLE_PROPERTY_attributes attribute.
312 /// Keep this list in sync with clang's DeclSpec.h ObjCPropertyAttributeKind!
314 #define HANDLE_DW_APPLE_PROPERTY(ID, NAME) DW_APPLE_PROPERTY_##NAME = ID,
315 #include "llvm/BinaryFormat/Dwarf.def"
316 };
317 
318 /// Constants for unit types in DWARF v5.
319 enum UnitType : unsigned char {
320 #define HANDLE_DW_UT(ID, NAME) DW_UT_##NAME = ID,
321 #include "llvm/BinaryFormat/Dwarf.def"
324 };
325 
326 enum Index {
327 #define HANDLE_DW_IDX(ID, NAME) DW_IDX_##NAME = ID,
328 #include "llvm/BinaryFormat/Dwarf.def"
329  DW_IDX_lo_user = 0x2000,
330  DW_IDX_hi_user = 0x3fff
331 };
332 
333 inline bool isUnitType(uint8_t UnitType) {
334  switch (UnitType) {
335  case DW_UT_compile:
336  case DW_UT_type:
337  case DW_UT_partial:
338  case DW_UT_skeleton:
339  case DW_UT_split_compile:
340  case DW_UT_split_type:
341  return true;
342  default:
343  return false;
344  }
345 }
346 
347 inline bool isUnitType(dwarf::Tag T) {
348  switch (T) {
349  case DW_TAG_compile_unit:
350  case DW_TAG_type_unit:
351  case DW_TAG_partial_unit:
352  case DW_TAG_skeleton_unit:
353  return true;
354  default:
355  return false;
356  }
357 }
358 
359 // Constants for the DWARF v5 Accelerator Table Proposal
361  // Data layout descriptors.
362  DW_ATOM_null = 0u, /// Marker as the end of a list of atoms.
363  DW_ATOM_die_offset = 1u, // DIE offset in the debug_info section.
364  DW_ATOM_cu_offset = 2u, // Offset of the compile unit header that contains the
365  // item in question.
366  DW_ATOM_die_tag = 3u, // A tag entry.
367  DW_ATOM_type_flags = 4u, // Set of flags for a type.
368 
369  DW_ATOM_type_type_flags = 5u, // Dsymutil type extension.
370  DW_ATOM_qual_name_hash = 6u, // Dsymutil qualified hash extension.
371 
372  // DW_ATOM_type_flags values.
373 
374  // Always set for C++, only set for ObjC if this is the @implementation for a
375  // class.
377 
378  // Hash functions.
379 
380  // Daniel J. Bernstein hash.
382 };
383 
384 // Constants for the GNU pubnames/pubtypes extensions supporting gdb index.
394 };
395 
397 
398 /// \defgroup DwarfConstantsDumping Dwarf constants dumping functions
399 ///
400 /// All these functions map their argument's value back to the
401 /// corresponding enumerator name or return an empty StringRef if the value
402 /// isn't known.
403 ///
404 /// @{
405 StringRef TagString(unsigned Tag);
406 StringRef ChildrenString(unsigned Children);
408 StringRef FormEncodingString(unsigned Encoding);
409 StringRef OperationEncodingString(unsigned Encoding);
410 StringRef AttributeEncodingString(unsigned Encoding);
411 StringRef DecimalSignString(unsigned Sign);
412 StringRef EndianityString(unsigned Endian);
413 StringRef AccessibilityString(unsigned Access);
415 StringRef VirtualityString(unsigned Virtuality);
417 StringRef CaseString(unsigned Case);
418 StringRef ConventionString(unsigned Convention);
419 StringRef InlineCodeString(unsigned Code);
420 StringRef ArrayOrderString(unsigned Order);
421 StringRef LNStandardString(unsigned Standard);
422 StringRef LNExtendedString(unsigned Encoding);
423 StringRef MacinfoString(unsigned Encoding);
424 StringRef RangeListEncodingString(unsigned Encoding);
425 StringRef CallFrameString(unsigned Encoding, Triple::ArchType Arch);
427 StringRef UnitTypeString(unsigned);
428 StringRef AtomTypeString(unsigned Atom);
431 StringRef IndexString(unsigned Idx);
432 /// @}
433 
434 /// \defgroup DwarfConstantsParsing Dwarf constants parsing functions
435 ///
436 /// These functions map their strings back to the corresponding enumeration
437 /// value or return 0 if there is none, except for these exceptions:
438 ///
439 /// \li \a getTag() returns \a DW_TAG_invalid on invalid input.
440 /// \li \a getVirtuality() returns \a DW_VIRTUALITY_invalid on invalid input.
441 /// \li \a getMacinfo() returns \a DW_MACINFO_invalid on invalid input.
442 ///
443 /// @{
444 unsigned getTag(StringRef TagString);
445 unsigned getOperationEncoding(StringRef OperationEncodingString);
446 unsigned getVirtuality(StringRef VirtualityString);
447 unsigned getLanguage(StringRef LanguageString);
448 unsigned getCallingConvention(StringRef LanguageString);
449 unsigned getAttributeEncoding(StringRef EncodingString);
450 unsigned getMacinfo(StringRef MacinfoString);
451 /// @}
452 
453 /// \defgroup DwarfConstantsVersioning Dwarf version for constants
454 ///
455 /// For constants defined by DWARF, returns the DWARF version when the constant
456 /// was first defined. For vendor extensions, if there is a version-related
457 /// policy for when to emit it, returns a version number for that policy.
458 /// Otherwise returns 0.
459 ///
460 /// @{
461 unsigned TagVersion(Tag T);
462 unsigned AttributeVersion(Attribute A);
463 unsigned FormVersion(Form F);
466 unsigned LanguageVersion(SourceLanguage L);
467 /// @}
468 
469 /// \defgroup DwarfConstantsVendor Dwarf "vendor" for constants
470 ///
471 /// These functions return an identifier describing "who" defined the constant,
472 /// either the DWARF standard itself or the vendor who defined the extension.
473 ///
474 /// @{
475 unsigned TagVendor(Tag T);
476 unsigned AttributeVendor(Attribute A);
477 unsigned FormVendor(Form F);
478 unsigned OperationVendor(LocationAtom O);
480 unsigned LanguageVendor(SourceLanguage L);
481 /// @}
482 
484 
485 /// A helper struct providing information about the byte size of DW_FORM
486 /// values that vary in size depending on the DWARF version, address byte
487 /// size, or DWARF32/DWARF64.
488 struct FormParams {
489  uint16_t Version;
490  uint8_t AddrSize;
492 
493  /// The definition of the size of form DW_FORM_ref_addr depends on the
494  /// version. In DWARF v2 it's the size of an address; after that, it's the
495  /// size of a reference.
496  uint8_t getRefAddrByteSize() const {
497  if (Version == 2)
498  return AddrSize;
499  return getDwarfOffsetByteSize();
500  }
501 
502  /// The size of a reference is determined by the DWARF 32/64-bit format.
503  uint8_t getDwarfOffsetByteSize() const {
504  switch (Format) {
506  return 4;
508  return 8;
509  }
510  llvm_unreachable("Invalid Format value");
511  }
512 
513  explicit operator bool() const { return Version && AddrSize; }
514 };
515 
516 /// Get the fixed byte size for a given form.
517 ///
518 /// If the form has a fixed byte size, then an Optional with a value will be
519 /// returned. If the form is always encoded using a variable length storage
520 /// format (ULEB or SLEB numbers or blocks) then None will be returned.
521 ///
522 /// \param Form DWARF form to get the fixed byte size for.
523 /// \param Params DWARF parameters to help interpret forms.
524 /// \returns Optional<uint8_t> value with the fixed byte size or None if
525 /// \p Form doesn't have a fixed byte size.
527 
528 /// Tells whether the specified form is defined in the specified version,
529 /// or is an extension if extensions are allowed.
530 bool isValidFormForVersion(Form F, unsigned Version, bool ExtensionsOk = true);
531 
532 /// Returns the symbolic string representing Val when used as a value
533 /// for attribute Attr.
534 StringRef AttributeValueString(uint16_t Attr, unsigned Val);
535 
536 /// Returns the symbolic string representing Val when used as a value
537 /// for atom Atom.
538 StringRef AtomValueString(uint16_t Atom, unsigned Val);
539 
540 /// Describes an entry of the various gnu_pub* debug sections.
541 ///
542 /// The gnu_pub* kind looks like:
543 ///
544 /// 0-3 reserved
545 /// 4-6 symbol kind
546 /// 7 0 == global, 1 == static
547 ///
548 /// A gdb_index descriptor includes the above kind, shifted 24 bits up with the
549 /// offset of the cu within the debug_info section stored in those 24 bits.
554  : Kind(Kind), Linkage(Linkage) {}
556  : Kind(Kind), Linkage(GIEL_EXTERNAL) {}
557  explicit PubIndexEntryDescriptor(uint8_t Value)
558  : Kind(
559  static_cast<GDBIndexEntryKind>((Value & KIND_MASK) >> KIND_OFFSET)),
560  Linkage(static_cast<GDBIndexEntryLinkage>((Value & LINKAGE_MASK) >>
561  LINKAGE_OFFSET)) {}
562  uint8_t toBits() const {
563  return Kind << KIND_OFFSET | Linkage << LINKAGE_OFFSET;
564  }
565 
566 private:
567  enum {
568  KIND_OFFSET = 4,
569  KIND_MASK = 7 << KIND_OFFSET,
570  LINKAGE_OFFSET = 7,
571  LINKAGE_MASK = 1 << LINKAGE_OFFSET
572  };
573 };
574 
575 template <typename Enum> struct EnumTraits : public std::false_type {};
576 
577 template <> struct EnumTraits<Attribute> : public std::true_type {
578  static constexpr char Type[3] = "AT";
579  static constexpr StringRef (*StringFn)(unsigned) = &AttributeString;
580 };
581 
582 template <> struct EnumTraits<Form> : public std::true_type {
583  static constexpr char Type[5] = "FORM";
584  static constexpr StringRef (*StringFn)(unsigned) = &FormEncodingString;
585 };
586 
587 template <> struct EnumTraits<Index> : public std::true_type {
588  static constexpr char Type[4] = "IDX";
589  static constexpr StringRef (*StringFn)(unsigned) = &IndexString;
590 };
591 
592 template <> struct EnumTraits<Tag> : public std::true_type {
593  static constexpr char Type[4] = "TAG";
594  static constexpr StringRef (*StringFn)(unsigned) = &TagString;
595 };
596 } // End of namespace dwarf
597 
598 /// Dwarf constants format_provider
599 ///
600 /// Specialization of the format_provider template for dwarf enums. Unlike the
601 /// dumping functions above, these format unknown enumerator values as
602 /// DW_TYPE_unknown_1234 (e.g. DW_TAG_unknown_ffff).
603 template <typename Enum>
605  Enum, typename std::enable_if<dwarf::EnumTraits<Enum>::value>::type> {
606  static void format(const Enum &E, raw_ostream &OS, StringRef Style) {
608  if (Str.empty()) {
609  OS << "DW_" << dwarf::EnumTraits<Enum>::Type << "_unknown_"
610  << llvm::format("%x", E);
611  } else
612  OS << Str;
613  }
614 };
615 } // End of namespace llvm
616 
617 #endif
DecimalSignEncoding
Definition: Dwarf.h:132
MacinfoRecordType
Definition: Dwarf.h:240
LocationAtom
Definition: Dwarf.h:115
unsigned FormVersion(Form F)
Definition: Dwarf.cpp:116
StringRef ApplePropertyString(unsigned)
Definition: Dwarf.cpp:504
A helper struct providing information about the byte size of DW_FORM values that vary in size dependi...
Definition: Dwarf.h:488
PubIndexEntryDescriptor(GDBIndexEntryKind Kind)
Definition: Dwarf.h:555
StringRef IndexString(unsigned Idx)
Definition: Dwarf.cpp:620
LineNumberOps
Line Number Standard Opcode Encodings.
Definition: Dwarf.h:220
Not specified by DWARF.
Definition: Dwarf.h:112
This class represents lattice values for constants.
Definition: AllocatorList.h:23
StringRef AtomTypeString(unsigned Atom)
Definition: Dwarf.cpp:526
unsigned FormVendor(Form F)
Definition: Dwarf.cpp:127
bool isUnitType(uint8_t UnitType)
Definition: Dwarf.h:333
Attribute
Attributes.
Definition: Dwarf.h:102
StringRef LNExtendedString(unsigned Encoding)
Definition: Dwarf.cpp:424
StringRef LNStandardString(unsigned Standard)
Definition: Dwarf.cpp:413
unsigned TagVendor(Tag T)
Definition: Dwarf.cpp:51
format_object< Ts... > format(const char *Fmt, const Ts &... Vals)
These are helper functions used to produce formatted output.
Definition: Format.h:124
uint8_t getRefAddrByteSize() const
The definition of the size of form DW_FORM_ref_addr depends on the version.
Definition: Dwarf.h:496
Only used in LLVM metadata.
Definition: Dwarf.h:121
GDBIndexEntryKind
Definition: Dwarf.h:385
F(f)
ArrayDimensionOrdering
Definition: Dwarf.h:207
ELFYAML::ELF_STV Visibility
Definition: ELFYAML.cpp:876
Optional< unsigned > LanguageLowerBound(SourceLanguage L)
Definition: Dwarf.cpp:346
unsigned getVirtuality(StringRef VirtualityString)
Definition: Dwarf.cpp:297
constexpr char Language[]
Key for Kernel::Metadata::mLanguage.
StringRef CallFrameString(unsigned Encoding, Triple::ArchType Arch)
Definition: Dwarf.cpp:475
InlineAttribute
Definition: Dwarf.h:199
CallFrameInfo
Call frame instruction encodings.
Definition: Dwarf.h:264
Definition: BitVector.h:937
EndianityEncoding
Definition: Dwarf.h:141
DwarfFormat
Constants that define the DWARF format as 32 or 64 bit.
Definition: Dwarf.h:70
LLVMConstants
Definition: Dwarf.h:43
unsigned TagVersion(Tag T)
Definition: Dwarf.cpp:40
unsigned AttributeVendor(Attribute A)
Definition: Dwarf.cpp:94
StringRef FormEncodingString(unsigned Encoding)
Definition: Dwarf.cpp:105
Only used in LLVM metadata.
Definition: Dwarf.h:120
PubIndexEntryDescriptor(uint8_t Value)
Definition: Dwarf.h:557
LLVM_NODISCARD bool empty() const
empty - Check if the string is empty.
Definition: StringRef.h:126
unsigned LanguageVendor(SourceLanguage L)
Definition: Dwarf.cpp:335
Describes an entry of the various gnu_pub* debug sections.
Definition: Dwarf.h:550
#define UINT64_MAX
Definition: DataTypes.h:83
MacroEntryType
DWARF v5 macro information entry type encodings.
Definition: Dwarf.h:250
StringRef AttributeString(unsigned Attribute)
Definition: Dwarf.cpp:72
StringRef LanguageString(unsigned Language)
Definition: Dwarf.cpp:305
AccessAttribute
Definition: Dwarf.h:149
StringRef DecimalSignString(unsigned Sign)
Definition: Dwarf.cpp:229
StringRef AttributeValueString(uint16_t Attr, unsigned Val)
Returns the symbolic string representing Val when used as a value for attribute Attr.
Definition: Dwarf.cpp:578
unsigned LanguageVersion(SourceLanguage L)
Definition: Dwarf.cpp:324
StringRef GDBIndexEntryKindString(GDBIndexEntryKind Kind)
Definition: Dwarf.cpp:545
StringRef AccessibilityString(unsigned Access)
Definition: Dwarf.cpp:261
const uint32_t DW_INVALID_OFFSET
Identifier of an invalid DIE offset in the .debug_info section.
Definition: Dwarf.h:80
StringRef EndianityString(unsigned Endian)
Definition: Dwarf.cpp:245
StringRef AttributeEncodingString(unsigned Encoding)
Definition: Dwarf.cpp:188
The instances of the Type class are immutable: once they are created, they are never changed...
Definition: Type.h:45
unsigned OperationVendor(LocationAtom O)
Definition: Dwarf.cpp:177
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
unsigned getCallingConvention(StringRef LanguageString)
Definition: Dwarf.cpp:382
Only used in LLVM metadata.
Definition: Dwarf.h:122
SourceLanguage
Definition: Dwarf.h:175
unsigned getOperationEncoding(StringRef OperationEncodingString)
Definition: Dwarf.cpp:155
StringRef ArrayOrderString(unsigned Order)
Definition: Dwarf.cpp:403
Recommended base for user tags.
Definition: Dwarf.h:87
unsigned OperationVersion(LocationAtom O)
Definition: Dwarf.cpp:166
StringRef GDBIndexEntryLinkageString(GDBIndexEntryLinkage Linkage)
Definition: Dwarf.cpp:568
GDBIndexEntryLinkage Linkage
Definition: Dwarf.h:552
unsigned getLanguage(StringRef LanguageString)
Definition: Dwarf.cpp:316
StringRef RangeListEncodingString(unsigned Encoding)
Definition: Dwarf.cpp:464
VisibilityAttribute
Definition: Dwarf.h:156
LineNumberExtendedOps
Line Number Extended Opcode Encodings.
Definition: Dwarf.h:226
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
StringRef VirtualityString(unsigned Virtuality)
Definition: Dwarf.cpp:286
StringRef OperationEncodingString(unsigned Encoding)
Definition: Dwarf.cpp:138
const uint32_t DW_CIE_ID
Special ID values that distinguish a CIE from a FDE in DWARF CFI.
Definition: Dwarf.h:75
unsigned getTag(StringRef TagString)
Definition: Dwarf.cpp:32
UnitType
Constants for unit types in DWARF v5.
Definition: Dwarf.h:319
StringRef CaseString(unsigned Case)
Definition: Dwarf.cpp:357
ApplePropertyAttributes
Constants for the DW_APPLE_PROPERTY_attributes attribute.
Definition: Dwarf.h:313
unsigned AttributeVersion(Attribute A)
Definition: Dwarf.cpp:83
static void format(const Enum &E, raw_ostream &OS, StringRef Style)
Definition: Dwarf.h:606
AcceleratorTable
Definition: Dwarf.h:360
LocationListEntry
Constants for location lists in DWARF v5.
Definition: Dwarf.h:299
bool isType(Tag T)
Definition: Dwarf.h:90
PubIndexEntryDescriptor(GDBIndexEntryKind Kind, GDBIndexEntryLinkage Linkage)
Definition: Dwarf.h:553
unsigned AttributeEncodingVersion(TypeKind E)
Definition: Dwarf.cpp:207
StringRef VisibilityString(unsigned Visibility)
Definition: Dwarf.cpp:274
RangeListEntries
DWARF v5 range list entry encoding values.
Definition: Dwarf.h:258
StringRef UnitTypeString(unsigned)
Definition: Dwarf.cpp:515
StringRef AtomValueString(uint16_t Atom, unsigned Val)
Returns the symbolic string representing Val when used as a value for atom Atom.
Definition: Dwarf.cpp:609
Optional< uint8_t > getFixedFormByteSize(dwarf::Form Form, FormParams Params)
Get the fixed byte size for a given form.
Definition: Dwarf.cpp:631
StringRef TagString(unsigned Tag)
Definition: Dwarf.cpp:21
unsigned AttributeEncodingVendor(TypeKind E)
Definition: Dwarf.cpp:218
StringRef InlineCodeString(unsigned Code)
Definition: Dwarf.cpp:389
StringRef ConventionString(unsigned Convention)
Definition: Dwarf.cpp:371
unsigned getMacinfo(StringRef MacinfoString)
Definition: Dwarf.cpp:454
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:718
CallingConvention
Definition: Dwarf.h:191
DwarfFormat Format
Definition: Dwarf.h:491
VirtualityAttribute
Definition: Dwarf.h:163
LLVM Value Representation.
Definition: Value.h:73
unsigned getAttributeEncoding(StringRef EncodingString)
Definition: Dwarf.cpp:199
This class implements an extremely fast bulk output stream that can only output to a stream...
Definition: raw_ostream.h:45
GDBIndexEntryLinkage
Definition: Dwarf.h:396
DiscriminantList
Definition: Dwarf.h:213
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:48
StringRef MacinfoString(unsigned Encoding)
Definition: Dwarf.cpp:435
Marker as the end of a list of atoms.
Definition: Dwarf.h:363
LineNumberEntryFormat
Definition: Dwarf.h:233
CaseSensitivity
Definition: Dwarf.h:183
uint8_t getDwarfOffsetByteSize() const
The size of a reference is determined by the DWARF 32/64-bit format.
Definition: Dwarf.h:503
DefaultedMemberAttribute
Definition: Dwarf.h:169
const uint64_t DW64_CIE_ID
Definition: Dwarf.h:76