LLVM  15.0.0git
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/Support/Compiler.h"
23 #include "llvm/Support/DataTypes.h"
25 #include "llvm/Support/Format.h"
27 #include "llvm/ADT/Triple.h"
28 
29 #include <limits>
30 
31 namespace llvm {
32 class StringRef;
33 template<typename T> class Optional;
34 
35 namespace dwarf {
36 
37 
38 //===----------------------------------------------------------------------===//
39 // DWARF constants as gleaned from the DWARF Debugging Information Format V.5
40 // reference manual http://www.dwarfstd.org/.
41 //
42 
43 // Do not mix the following two enumerations sets. DW_TAG_invalid changes the
44 // enumeration base type.
45 
47  /// LLVM mock tags (see also llvm/BinaryFormat/Dwarf.def).
48  /// \{
49  DW_TAG_invalid = ~0U, ///< Tag for invalid results.
50  DW_VIRTUALITY_invalid = ~0U, ///< Virtuality for invalid results.
51  DW_MACINFO_invalid = ~0U, ///< Macinfo type for invalid results.
52  /// \}
53 
54  /// Special values for an initial length field.
55  /// \{
56  DW_LENGTH_lo_reserved = 0xfffffff0, ///< Lower bound of the reserved range.
57  DW_LENGTH_DWARF64 = 0xffffffff, ///< Indicator of 64-bit DWARF format.
58  DW_LENGTH_hi_reserved = 0xffffffff, ///< Upper bound of the reserved range.
59  /// \}
60 
61  /// Other constants.
62  /// \{
63  DWARF_VERSION = 4, ///< Default dwarf version we output.
64  DW_PUBTYPES_VERSION = 2, ///< Section version number for .debug_pubtypes.
65  DW_PUBNAMES_VERSION = 2, ///< Section version number for .debug_pubnames.
66  DW_ARANGES_VERSION = 2, ///< Section version number for .debug_aranges.
67  /// \}
68 
69  /// Identifiers we use to distinguish vendor extensions.
70  /// \{
71  DWARF_VENDOR_DWARF = 0, ///< Defined in v2 or later of the DWARF standard.
89  ///\}
90 };
91 
92 /// Constants that define the DWARF format as 32 or 64 bit.
93 enum DwarfFormat : uint8_t { DWARF32, DWARF64 };
94 
95 /// Special ID values that distinguish a CIE from a FDE in DWARF CFI.
96 /// Not inside an enum because a 64-bit value is needed.
97 /// @{
98 const uint32_t DW_CIE_ID = UINT32_MAX;
100 /// @}
101 
102 /// Identifier of an invalid DIE offset in the .debug_info section.
103 const uint32_t DW_INVALID_OFFSET = UINT32_MAX;
104 
105 enum Tag : uint16_t {
106 #define HANDLE_DW_TAG(ID, NAME, VERSION, VENDOR, KIND) DW_TAG_##NAME = ID,
107 #include "llvm/BinaryFormat/Dwarf.def"
108  DW_TAG_lo_user = 0x4080,
109  DW_TAG_hi_user = 0xffff,
110  DW_TAG_user_base = 0x1000 ///< Recommended base for user tags.
111 };
112 
113 inline bool isType(Tag T) {
114  switch (T) {
115  default:
116  return false;
117 #define HANDLE_DW_TAG(ID, NAME, VERSION, VENDOR, KIND) \
118  case DW_TAG_##NAME: \
119  return (KIND == DW_KIND_TYPE);
120 #include "llvm/BinaryFormat/Dwarf.def"
121  }
122 }
123 
124 /// Attributes.
126 #define HANDLE_DW_AT(ID, NAME, VERSION, VENDOR) DW_AT_##NAME = ID,
127 #include "llvm/BinaryFormat/Dwarf.def"
128  DW_AT_lo_user = 0x2000,
129  DW_AT_hi_user = 0x3fff,
130 };
131 
132 enum Form : uint16_t {
133 #define HANDLE_DW_FORM(ID, NAME, VERSION, VENDOR) DW_FORM_##NAME = ID,
134 #include "llvm/BinaryFormat/Dwarf.def"
135  DW_FORM_lo_user = 0x1f00, ///< Not specified by DWARF.
136 };
137 
139 #define HANDLE_DW_OP(ID, NAME, VERSION, VENDOR) DW_OP_##NAME = ID,
140 #include "llvm/BinaryFormat/Dwarf.def"
143  DW_OP_LLVM_fragment = 0x1000, ///< Only used in LLVM metadata.
144  DW_OP_LLVM_convert = 0x1001, ///< Only used in LLVM metadata.
145  DW_OP_LLVM_tag_offset = 0x1002, ///< Only used in LLVM metadata.
146  DW_OP_LLVM_entry_value = 0x1003, ///< Only used in LLVM metadata.
147  DW_OP_LLVM_implicit_pointer = 0x1004, ///< Only used in LLVM metadata.
148  DW_OP_LLVM_arg = 0x1005, ///< Only used in LLVM metadata.
149 };
150 
151 enum TypeKind : uint8_t {
152 #define HANDLE_DW_ATE(ID, NAME, VERSION, VENDOR) DW_ATE_##NAME = ID,
153 #include "llvm/BinaryFormat/Dwarf.def"
156 };
157 
159  // Decimal sign attribute values
165 };
166 
168  // Endianity attribute values
169 #define HANDLE_DW_END(ID, NAME) DW_END_##NAME = ID,
170 #include "llvm/BinaryFormat/Dwarf.def"
173 };
174 
176  // Accessibility codes
180 };
181 
183  // Visibility codes
184  DW_VIS_local = 0x01,
187 };
188 
190 #define HANDLE_DW_VIRTUALITY(ID, NAME) DW_VIRTUALITY_##NAME = ID,
191 #include "llvm/BinaryFormat/Dwarf.def"
193 };
194 
196 #define HANDLE_DW_DEFAULTED(ID, NAME) DW_DEFAULTED_##NAME = ID,
197 #include "llvm/BinaryFormat/Dwarf.def"
199 };
200 
202 #define HANDLE_DW_LANG(ID, NAME, LOWER_BOUND, VERSION, VENDOR) \
203  DW_LANG_##NAME = ID,
204 #include "llvm/BinaryFormat/Dwarf.def"
205  DW_LANG_lo_user = 0x8000,
207 };
208 
210  bool result = false;
211  // Deliberately enumerate all the language options so we get a warning when
212  // new language options are added (-Wswitch) that'll hopefully help keep this
213  // switch up-to-date when new C++ versions are added.
214  switch (S) {
215  case DW_LANG_C_plus_plus:
216  case DW_LANG_C_plus_plus_03:
217  case DW_LANG_C_plus_plus_11:
218  case DW_LANG_C_plus_plus_14:
219  result = true;
220  break;
221  case DW_LANG_C89:
222  case DW_LANG_C:
223  case DW_LANG_Ada83:
224  case DW_LANG_Cobol74:
225  case DW_LANG_Cobol85:
226  case DW_LANG_Fortran77:
227  case DW_LANG_Fortran90:
228  case DW_LANG_Pascal83:
229  case DW_LANG_Modula2:
230  case DW_LANG_Java:
231  case DW_LANG_C99:
232  case DW_LANG_Ada95:
233  case DW_LANG_Fortran95:
234  case DW_LANG_PLI:
235  case DW_LANG_ObjC:
236  case DW_LANG_ObjC_plus_plus:
237  case DW_LANG_UPC:
238  case DW_LANG_D:
239  case DW_LANG_Python:
240  case DW_LANG_OpenCL:
241  case DW_LANG_Go:
242  case DW_LANG_Modula3:
243  case DW_LANG_Haskell:
244  case DW_LANG_OCaml:
245  case DW_LANG_Rust:
246  case DW_LANG_C11:
247  case DW_LANG_Swift:
248  case DW_LANG_Julia:
249  case DW_LANG_Dylan:
250  case DW_LANG_Fortran03:
251  case DW_LANG_Fortran08:
252  case DW_LANG_RenderScript:
253  case DW_LANG_BLISS:
254  case DW_LANG_Mips_Assembler:
255  case DW_LANG_GOOGLE_RenderScript:
256  case DW_LANG_BORLAND_Delphi:
257  case DW_LANG_lo_user:
258  case DW_LANG_hi_user:
259  result = false;
260  break;
261  }
262 
263  return result;
264 }
265 
266 inline bool isFortran(SourceLanguage S) {
267  bool result = false;
268  // Deliberately enumerate all the language options so we get a warning when
269  // new language options are added (-Wswitch) that'll hopefully help keep this
270  // switch up-to-date when new Fortran versions are added.
271  switch (S) {
272  case DW_LANG_Fortran77:
273  case DW_LANG_Fortran90:
274  case DW_LANG_Fortran95:
275  case DW_LANG_Fortran03:
276  case DW_LANG_Fortran08:
277  result = true;
278  break;
279  case DW_LANG_C89:
280  case DW_LANG_C:
281  case DW_LANG_Ada83:
282  case DW_LANG_C_plus_plus:
283  case DW_LANG_Cobol74:
284  case DW_LANG_Cobol85:
285  case DW_LANG_Pascal83:
286  case DW_LANG_Modula2:
287  case DW_LANG_Java:
288  case DW_LANG_C99:
289  case DW_LANG_Ada95:
290  case DW_LANG_PLI:
291  case DW_LANG_ObjC:
292  case DW_LANG_ObjC_plus_plus:
293  case DW_LANG_UPC:
294  case DW_LANG_D:
295  case DW_LANG_Python:
296  case DW_LANG_OpenCL:
297  case DW_LANG_Go:
298  case DW_LANG_Modula3:
299  case DW_LANG_Haskell:
300  case DW_LANG_C_plus_plus_03:
301  case DW_LANG_C_plus_plus_11:
302  case DW_LANG_OCaml:
303  case DW_LANG_Rust:
304  case DW_LANG_C11:
305  case DW_LANG_Swift:
306  case DW_LANG_Julia:
307  case DW_LANG_Dylan:
308  case DW_LANG_C_plus_plus_14:
309  case DW_LANG_RenderScript:
310  case DW_LANG_BLISS:
311  case DW_LANG_Mips_Assembler:
312  case DW_LANG_GOOGLE_RenderScript:
313  case DW_LANG_BORLAND_Delphi:
314  case DW_LANG_lo_user:
315  case DW_LANG_hi_user:
316  result = false;
317  break;
318  }
319 
320  return result;
321 }
322 
324  return isFortran(S) ? DW_ATE_signed : DW_ATE_unsigned;
325 }
326 
328  // Identifier case codes
333 };
334 
336 // Calling convention codes
337 #define HANDLE_DW_CC(ID, NAME) DW_CC_##NAME = ID,
338 #include "llvm/BinaryFormat/Dwarf.def"
341 };
342 
344  // Inline codes
349 };
350 
352  // Array ordering
355 };
356 
358  // Discriminant descriptor values
359  DW_DSC_label = 0x00,
361 };
362 
363 /// Line Number Standard Opcode Encodings.
364 enum LineNumberOps : uint8_t {
365 #define HANDLE_DW_LNS(ID, NAME) DW_LNS_##NAME = ID,
366 #include "llvm/BinaryFormat/Dwarf.def"
367 };
368 
369 /// Line Number Extended Opcode Encodings.
371 #define HANDLE_DW_LNE(ID, NAME) DW_LNE_##NAME = ID,
372 #include "llvm/BinaryFormat/Dwarf.def"
375 };
376 
378 #define HANDLE_DW_LNCT(ID, NAME) DW_LNCT_##NAME = ID,
379 #include "llvm/BinaryFormat/Dwarf.def"
380  DW_LNCT_lo_user = 0x2000,
381  DW_LNCT_hi_user = 0x3fff,
382 };
383 
385  // Macinfo Type Encodings
391 };
392 
393 /// DWARF v5 macro information entry type encodings.
395 #define HANDLE_DW_MACRO(ID, NAME) DW_MACRO_##NAME = ID,
396 #include "llvm/BinaryFormat/Dwarf.def"
399 };
400 
401 /// GNU .debug_macro macro information entry type encodings.
403 #define HANDLE_DW_MACRO_GNU(ID, NAME) DW_MACRO_GNU_##NAME = ID,
404 #include "llvm/BinaryFormat/Dwarf.def"
407 };
408 
409 /// DWARF v5 range list entry encoding values.
411 #define HANDLE_DW_RLE(ID, NAME) DW_RLE_##NAME = ID,
412 #include "llvm/BinaryFormat/Dwarf.def"
413 };
414 
415 /// DWARF v5 loc list entry encoding values.
417 #define HANDLE_DW_LLE(ID, NAME) DW_LLE_##NAME = ID,
418 #include "llvm/BinaryFormat/Dwarf.def"
419 };
420 
421 /// Call frame instruction encodings.
423 #define HANDLE_DW_CFA(ID, NAME) DW_CFA_##NAME = ID,
424 #define HANDLE_DW_CFA_PRED(ID, NAME, ARCH) DW_CFA_##NAME = ID,
425 #include "llvm/BinaryFormat/Dwarf.def"
427 
430 };
431 
432 enum Constants {
433  // Children flag
436 
454 };
455 
456 /// Constants for the DW_APPLE_PROPERTY_attributes attribute.
457 /// Keep this list in sync with clang's DeclObjCCommon.h
458 /// ObjCPropertyAttribute::Kind!
460 #define HANDLE_DW_APPLE_PROPERTY(ID, NAME) DW_APPLE_PROPERTY_##NAME = ID,
461 #include "llvm/BinaryFormat/Dwarf.def"
462 };
463 
464 /// Constants for unit types in DWARF v5.
465 enum UnitType : unsigned char {
466 #define HANDLE_DW_UT(ID, NAME) DW_UT_##NAME = ID,
467 #include "llvm/BinaryFormat/Dwarf.def"
470 };
471 
472 enum Index {
473 #define HANDLE_DW_IDX(ID, NAME) DW_IDX_##NAME = ID,
474 #include "llvm/BinaryFormat/Dwarf.def"
475  DW_IDX_lo_user = 0x2000,
476  DW_IDX_hi_user = 0x3fff
477 };
478 
479 inline bool isUnitType(uint8_t UnitType) {
480  switch (UnitType) {
481  case DW_UT_compile:
482  case DW_UT_type:
483  case DW_UT_partial:
484  case DW_UT_skeleton:
485  case DW_UT_split_compile:
486  case DW_UT_split_type:
487  return true;
488  default:
489  return false;
490  }
491 }
492 
493 inline bool isUnitType(dwarf::Tag T) {
494  switch (T) {
495  case DW_TAG_compile_unit:
496  case DW_TAG_type_unit:
497  case DW_TAG_partial_unit:
498  case DW_TAG_skeleton_unit:
499  return true;
500  default:
501  return false;
502  }
503 }
504 
505 // Constants for the DWARF v5 Accelerator Table Proposal
507  // Data layout descriptors.
508  DW_ATOM_null = 0u, /// Marker as the end of a list of atoms.
509  DW_ATOM_die_offset = 1u, // DIE offset in the debug_info section.
510  DW_ATOM_cu_offset = 2u, // Offset of the compile unit header that contains the
511  // item in question.
512  DW_ATOM_die_tag = 3u, // A tag entry.
513  DW_ATOM_type_flags = 4u, // Set of flags for a type.
514 
515  DW_ATOM_type_type_flags = 5u, // Dsymutil type extension.
516  DW_ATOM_qual_name_hash = 6u, // Dsymutil qualified hash extension.
517 
518  // DW_ATOM_type_flags values.
519 
520  // Always set for C++, only set for ObjC if this is the @implementation for a
521  // class.
523 
524  // Hash functions.
525 
526  // Daniel J. Bernstein hash.
528 };
529 
530 // Constants for the GNU pubnames/pubtypes extensions supporting gdb index.
540 };
541 
543 
544 /// \defgroup DwarfConstantsDumping Dwarf constants dumping functions
545 ///
546 /// All these functions map their argument's value back to the
547 /// corresponding enumerator name or return an empty StringRef if the value
548 /// isn't known.
549 ///
550 /// @{
551 StringRef TagString(unsigned Tag);
552 StringRef ChildrenString(unsigned Children);
554 StringRef FormEncodingString(unsigned Encoding);
555 StringRef OperationEncodingString(unsigned Encoding);
556 StringRef AttributeEncodingString(unsigned Encoding);
557 StringRef DecimalSignString(unsigned Sign);
558 StringRef EndianityString(unsigned Endian);
559 StringRef AccessibilityString(unsigned Access);
560 StringRef DefaultedMemberString(unsigned DefaultedEncodings);
561 StringRef VisibilityString(unsigned Visibility);
562 StringRef VirtualityString(unsigned Virtuality);
564 StringRef CaseString(unsigned Case);
565 StringRef ConventionString(unsigned Convention);
566 StringRef InlineCodeString(unsigned Code);
567 StringRef ArrayOrderString(unsigned Order);
568 StringRef LNStandardString(unsigned Standard);
569 StringRef LNExtendedString(unsigned Encoding);
570 StringRef MacinfoString(unsigned Encoding);
571 StringRef MacroString(unsigned Encoding);
572 StringRef GnuMacroString(unsigned Encoding);
573 StringRef RangeListEncodingString(unsigned Encoding);
574 StringRef LocListEncodingString(unsigned Encoding);
575 StringRef CallFrameString(unsigned Encoding, Triple::ArchType Arch);
577 StringRef UnitTypeString(unsigned);
578 StringRef AtomTypeString(unsigned Atom);
581 StringRef IndexString(unsigned Idx);
583 StringRef FormatString(bool IsDWARF64);
584 StringRef RLEString(unsigned RLE);
585 /// @}
586 
587 /// \defgroup DwarfConstantsParsing Dwarf constants parsing functions
588 ///
589 /// These functions map their strings back to the corresponding enumeration
590 /// value or return 0 if there is none, except for these exceptions:
591 ///
592 /// \li \a getTag() returns \a DW_TAG_invalid on invalid input.
593 /// \li \a getVirtuality() returns \a DW_VIRTUALITY_invalid on invalid input.
594 /// \li \a getMacinfo() returns \a DW_MACINFO_invalid on invalid input.
595 ///
596 /// @{
597 unsigned getTag(StringRef TagString);
602 unsigned getAttributeEncoding(StringRef EncodingString);
604 unsigned getMacro(StringRef MacroString);
605 /// @}
606 
607 /// \defgroup DwarfConstantsVersioning Dwarf version for constants
608 ///
609 /// For constants defined by DWARF, returns the DWARF version when the constant
610 /// was first defined. For vendor extensions, if there is a version-related
611 /// policy for when to emit it, returns a version number for that policy.
612 /// Otherwise returns 0.
613 ///
614 /// @{
615 unsigned TagVersion(Tag T);
616 unsigned AttributeVersion(Attribute A);
617 unsigned FormVersion(Form F);
620 unsigned LanguageVersion(SourceLanguage L);
621 /// @}
622 
623 /// \defgroup DwarfConstantsVendor Dwarf "vendor" for constants
624 ///
625 /// These functions return an identifier describing "who" defined the constant,
626 /// either the DWARF standard itself or the vendor who defined the extension.
627 ///
628 /// @{
629 unsigned TagVendor(Tag T);
630 unsigned AttributeVendor(Attribute A);
631 unsigned FormVendor(Form F);
632 unsigned OperationVendor(LocationAtom O);
634 unsigned LanguageVendor(SourceLanguage L);
635 /// @}
636 
638 
639 /// The size of a reference determined by the DWARF 32/64-bit format.
640 inline uint8_t getDwarfOffsetByteSize(DwarfFormat Format) {
641  switch (Format) {
643  return 4;
645  return 8;
646  }
647  llvm_unreachable("Invalid Format value");
648 }
649 
650 /// A helper struct providing information about the byte size of DW_FORM
651 /// values that vary in size depending on the DWARF version, address byte
652 /// size, or DWARF32/DWARF64.
653 struct FormParams {
655  uint8_t AddrSize;
657  /// True if DWARF v2 output generally uses relocations for references
658  /// to other .debug_* sections.
660 
661  /// The definition of the size of form DW_FORM_ref_addr depends on the
662  /// version. In DWARF v2 it's the size of an address; after that, it's the
663  /// size of a reference.
664  uint8_t getRefAddrByteSize() const {
665  if (Version == 2)
666  return AddrSize;
667  return getDwarfOffsetByteSize();
668  }
669 
670  /// The size of a reference is determined by the DWARF 32/64-bit format.
671  uint8_t getDwarfOffsetByteSize() const {
673  }
674 
675  explicit operator bool() const { return Version && AddrSize; }
676 };
677 
678 /// Get the byte size of the unit length field depending on the DWARF format.
679 inline uint8_t getUnitLengthFieldByteSize(DwarfFormat Format) {
680  switch (Format) {
682  return 4;
684  return 12;
685  }
686  llvm_unreachable("Invalid Format value");
687 }
688 
689 /// Get the fixed byte size for a given form.
690 ///
691 /// If the form has a fixed byte size, then an Optional with a value will be
692 /// returned. If the form is always encoded using a variable length storage
693 /// format (ULEB or SLEB numbers or blocks) then None will be returned.
694 ///
695 /// \param Form DWARF form to get the fixed byte size for.
696 /// \param Params DWARF parameters to help interpret forms.
697 /// \returns Optional<uint8_t> value with the fixed byte size or None if
698 /// \p Form doesn't have a fixed byte size.
700 
701 /// Tells whether the specified form is defined in the specified version,
702 /// or is an extension if extensions are allowed.
703 bool isValidFormForVersion(Form F, unsigned Version, bool ExtensionsOk = true);
704 
705 /// Returns the symbolic string representing Val when used as a value
706 /// for attribute Attr.
707 StringRef AttributeValueString(uint16_t Attr, unsigned Val);
708 
709 /// Returns the symbolic string representing Val when used as a value
710 /// for atom Atom.
711 StringRef AtomValueString(uint16_t Atom, unsigned Val);
712 
713 /// Describes an entry of the various gnu_pub* debug sections.
714 ///
715 /// The gnu_pub* kind looks like:
716 ///
717 /// 0-3 reserved
718 /// 4-6 symbol kind
719 /// 7 0 == global, 1 == static
720 ///
721 /// A gdb_index descriptor includes the above kind, shifted 24 bits up with the
722 /// offset of the cu within the debug_info section stored in those 24 bits.
727  : Kind(Kind), Linkage(Linkage) {}
730  explicit PubIndexEntryDescriptor(uint8_t Value)
731  : Kind(
732  static_cast<GDBIndexEntryKind>((Value & KIND_MASK) >> KIND_OFFSET)),
733  Linkage(static_cast<GDBIndexEntryLinkage>((Value & LINKAGE_MASK) >>
734  LINKAGE_OFFSET)) {}
735  uint8_t toBits() const {
736  return Kind << KIND_OFFSET | Linkage << LINKAGE_OFFSET;
737  }
738 
739 private:
740  enum {
741  KIND_OFFSET = 4,
742  KIND_MASK = 7 << KIND_OFFSET,
743  LINKAGE_OFFSET = 7,
744  LINKAGE_MASK = 1 << LINKAGE_OFFSET
745  };
746 };
747 
748 template <typename Enum> struct EnumTraits : public std::false_type {};
749 
750 template <> struct EnumTraits<Attribute> : public std::true_type {
751  static constexpr char Type[3] = "AT";
752  static constexpr StringRef (*StringFn)(unsigned) = &AttributeString;
753 };
754 
755 template <> struct EnumTraits<Form> : public std::true_type {
756  static constexpr char Type[5] = "FORM";
757  static constexpr StringRef (*StringFn)(unsigned) = &FormEncodingString;
758 };
759 
760 template <> struct EnumTraits<Index> : public std::true_type {
761  static constexpr char Type[4] = "IDX";
762  static constexpr StringRef (*StringFn)(unsigned) = &IndexString;
763 };
764 
765 template <> struct EnumTraits<Tag> : public std::true_type {
766  static constexpr char Type[4] = "TAG";
767  static constexpr StringRef (*StringFn)(unsigned) = &TagString;
768 };
769 
770 template <> struct EnumTraits<LineNumberOps> : public std::true_type {
771  static constexpr char Type[4] = "LNS";
772  static constexpr StringRef (*StringFn)(unsigned) = &LNStandardString;
773 };
774 
775 template <> struct EnumTraits<LocationAtom> : public std::true_type {
776  static constexpr char Type[3] = "OP";
777  static constexpr StringRef (*StringFn)(unsigned) = &OperationEncodingString;
778 };
779 
780 inline uint64_t computeTombstoneAddress(uint8_t AddressByteSize) {
781  return std::numeric_limits<uint64_t>::max() >> (8 - AddressByteSize) * 8;
782 }
783 
784 } // End of namespace dwarf
785 
786 /// Dwarf constants format_provider
787 ///
788 /// Specialization of the format_provider template for dwarf enums. Unlike the
789 /// dumping functions above, these format unknown enumerator values as
790 /// DW_TYPE_unknown_1234 (e.g. DW_TAG_unknown_ffff).
791 template <typename Enum>
792 struct format_provider<Enum, std::enable_if_t<dwarf::EnumTraits<Enum>::value>> {
793  static void format(const Enum &E, raw_ostream &OS, StringRef Style) {
795  if (Str.empty()) {
796  OS << "DW_" << dwarf::EnumTraits<Enum>::Type << "_unknown_"
797  << llvm::format("%x", E);
798  } else
799  OS << Str;
800  }
801 };
802 } // End of namespace llvm
803 
804 #endif
llvm::dwarf::CallingConvention
CallingConvention
Definition: Dwarf.h:335
llvm::dwarf::DW_VIRTUALITY_max
@ DW_VIRTUALITY_max
Definition: Dwarf.h:192
llvm::dwarf::AttributeEncodingString
StringRef AttributeEncodingString(unsigned Encoding)
Definition: Dwarf.cpp:197
llvm::dwarf::AttributeEncodingVendor
unsigned AttributeEncodingVendor(TypeKind E)
Definition: Dwarf.cpp:227
llvm::dwarf::LineNumberEntryFormat
LineNumberEntryFormat
Definition: Dwarf.h:377
llvm::dwarf::DWARF_VENDOR_GNU
@ DWARF_VENDOR_GNU
Definition: Dwarf.h:74
llvm::dwarf::DW_LENGTH_hi_reserved
@ DW_LENGTH_hi_reserved
Upper bound of the reserved range.
Definition: Dwarf.h:58
llvm::dwarf::DW_VIS_qualified
@ DW_VIS_qualified
Definition: Dwarf.h:186
llvm::dwarf::DW_ATOM_null
@ DW_ATOM_null
Definition: Dwarf.h:508
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:17
llvm::dwarf::GIEK_TYPE
@ GIEK_TYPE
Definition: Dwarf.h:533
llvm::dwarf::Constants
Constants
Definition: Dwarf.h:432
llvm::dwarf::DW_AT_lo_user
@ DW_AT_lo_user
Definition: Dwarf.h:128
llvm::dwarf::MacroString
StringRef MacroString(unsigned Encoding)
Definition: Dwarf.cpp:486
llvm::dwarf::DW_EH_PE_sdata4
@ DW_EH_PE_sdata4
Definition: Dwarf.h:445
llvm::dwarf::DW_PUBTYPES_VERSION
@ DW_PUBTYPES_VERSION
Section version number for .debug_pubtypes.
Definition: Dwarf.h:64
llvm::dwarf::DW_MACRO_hi_user
@ DW_MACRO_hi_user
Definition: Dwarf.h:398
llvm::dwarf::CallFrameInfo
CallFrameInfo
Call frame instruction encodings.
Definition: Dwarf.h:422
llvm::format_provider
Definition: FormatVariadicDetails.h:19
llvm::dwarf::DW_ACCESS_protected
@ DW_ACCESS_protected
Definition: Dwarf.h:178
llvm::dwarf::DW_LNCT_lo_user
@ DW_LNCT_lo_user
Definition: Dwarf.h:380
llvm::Attribute
Definition: Attributes.h:65
llvm::dwarf::DW_ATE_lo_user
@ DW_ATE_lo_user
Definition: Dwarf.h:154
llvm::dwarf::DW_ATOM_die_offset
@ DW_ATOM_die_offset
Marker as the end of a list of atoms.
Definition: Dwarf.h:509
llvm::dwarf::DW_ORD_col_major
@ DW_ORD_col_major
Definition: Dwarf.h:354
llvm::dwarf::DWARF_VENDOR_APPLE
@ DWARF_VENDOR_APPLE
Definition: Dwarf.h:72
llvm::dwarf::DW_MACRO_lo_user
@ DW_MACRO_lo_user
Definition: Dwarf.h:397
llvm::dwarf::PubIndexEntryDescriptor::PubIndexEntryDescriptor
PubIndexEntryDescriptor(GDBIndexEntryKind Kind)
Definition: Dwarf.h:728
llvm::dwarf::GIEL_EXTERNAL
@ GIEL_EXTERNAL
Definition: Dwarf.h:542
llvm::dwarf::GDBIndexEntryLinkageString
StringRef GDBIndexEntryLinkageString(GDBIndexEntryLinkage Linkage)
Definition: Dwarf.cpp:629
llvm::dwarf::DW_UT_hi_user
@ DW_UT_hi_user
Definition: Dwarf.h:469
llvm::dwarf::DWARF_VENDOR_MIPS
@ DWARF_VENDOR_MIPS
Definition: Dwarf.h:77
llvm::dwarf::LLVMConstants
LLVMConstants
Definition: Dwarf.h:46
llvm::dwarf::Form
Form
Definition: Dwarf.h:132
ErrorHandling.h
llvm::dwarf::DecimalSignEncoding
DecimalSignEncoding
Definition: Dwarf.h:158
llvm::dwarf::getVirtuality
unsigned getVirtuality(StringRef VirtualityString)
Definition: Dwarf.cpp:319
llvm::dwarf::DWARF_VENDOR_PGI
@ DWARF_VENDOR_PGI
Definition: Dwarf.h:86
llvm::dwarf::DW_OP_hi_user
@ DW_OP_hi_user
Definition: Dwarf.h:142
llvm::dwarf::DW_EH_PE_sdata8
@ DW_EH_PE_sdata8
Definition: Dwarf.h:446
llvm::dwarf::DW_OP_LLVM_tag_offset
@ DW_OP_LLVM_tag_offset
Only used in LLVM metadata.
Definition: Dwarf.h:145
llvm::dwarf::InlineAttribute
InlineAttribute
Definition: Dwarf.h:343
llvm::dwarf::DW_LENGTH_DWARF64
@ DW_LENGTH_DWARF64
Indicator of 64-bit DWARF format.
Definition: Dwarf.h:57
llvm::dwarf::DWARF_VENDOR_COMPAQ
@ DWARF_VENDOR_COMPAQ
Definition: Dwarf.h:80
llvm::dwarf::DW_ATOM_qual_name_hash
@ DW_ATOM_qual_name_hash
Definition: Dwarf.h:516
llvm::Type
The instances of the Type class are immutable: once they are created, they are never changed.
Definition: Type.h:45
llvm::dwarf::DW_VIS_exported
@ DW_VIS_exported
Definition: Dwarf.h:185
llvm::dwarf::DW_INL_not_inlined
@ DW_INL_not_inlined
Definition: Dwarf.h:345
llvm::dwarf::FormParams::AddrSize
uint8_t AddrSize
Definition: Dwarf.h:655
llvm::dwarf::DWARF_VERSION
@ DWARF_VERSION
Other constants.
Definition: Dwarf.h:63
llvm::dwarf::RangeListEncodingString
StringRef RangeListEncodingString(unsigned Encoding)
Definition: Dwarf.cpp:514
llvm::dwarf::DW_CHILDREN_yes
@ DW_CHILDREN_yes
Definition: Dwarf.h:435
llvm::dwarf::FormVersion
unsigned FormVersion(Form F)
Definition: Dwarf.cpp:116
llvm::Optional< unsigned >
T
#define T
Definition: Mips16ISelLowering.cpp:341
llvm::dwarf::GIEK_VARIABLE
@ GIEK_VARIABLE
Definition: Dwarf.h:534
llvm::max
Expected< ExpressionValue > max(const ExpressionValue &Lhs, const ExpressionValue &Rhs)
Definition: FileCheck.cpp:337
llvm::dwarf::GDBIndexEntryKind
GDBIndexEntryKind
Definition: Dwarf.h:531
llvm::dwarf::ArrayDimensionOrdering
ArrayDimensionOrdering
Definition: Dwarf.h:351
llvm::dwarf::DW_INL_declared_not_inlined
@ DW_INL_declared_not_inlined
Definition: Dwarf.h:347
llvm::dwarf::AttributeVendor
unsigned AttributeVendor(Attribute A)
Definition: Dwarf.cpp:94
llvm::dwarf::Tag
Tag
Definition: Dwarf.h:105
llvm::dwarf::getCallingConvention
unsigned getCallingConvention(StringRef LanguageString)
Definition: Dwarf.cpp:404
llvm::dwarf::LoclistEntries
LoclistEntries
DWARF v5 loc list entry encoding values.
Definition: Dwarf.h:416
Format.h
llvm::dwarf::VirtualityString
StringRef VirtualityString(unsigned Virtuality)
Definition: Dwarf.cpp:308
llvm::dwarf::FormParams::Format
DwarfFormat Format
Definition: Dwarf.h:656
llvm::dwarf::DW_TAG_lo_user
@ DW_TAG_lo_user
Definition: Dwarf.h:108
llvm::dwarf::isUnitType
bool isUnitType(uint8_t UnitType)
Definition: Dwarf.h:479
llvm::dwarf::GIEL_STATIC
@ GIEL_STATIC
Definition: Dwarf.h:542
llvm::dwarf::PubIndexEntryDescriptor::PubIndexEntryDescriptor
PubIndexEntryDescriptor(uint8_t Value)
Definition: Dwarf.h:730
llvm::dwarf::IndexString
StringRef IndexString(unsigned Idx)
Definition: Dwarf.cpp:683
llvm::dwarf::DW_LNE_lo_user
@ DW_LNE_lo_user
Definition: Dwarf.h:373
llvm::dwarf::DW_EH_PE_textrel
@ DW_EH_PE_textrel
Definition: Dwarf.h:449
llvm::dwarf::Attribute
Attribute
Attributes.
Definition: Dwarf.h:125
llvm::dwarf::AccessibilityString
StringRef AccessibilityString(unsigned Access)
Definition: Dwarf.cpp:270
F
#define F(x, y, z)
Definition: MD5.cpp:55
llvm::dwarf::GnuMacroString
StringRef GnuMacroString(unsigned Encoding)
Definition: Dwarf.cpp:497
llvm::dwarf::DW_MACINFO_end_file
@ DW_MACINFO_end_file
Definition: Dwarf.h:389
llvm::dwarf::GnuMacroEntryType
GnuMacroEntryType
GNU .debug_macro macro information entry type encodings.
Definition: Dwarf.h:402
result
It looks like we only need to define PPCfmarto for these because according to these instructions perform RTO on fma s result
Definition: README_P9.txt:256
llvm::dwarf::TagVendor
unsigned TagVendor(Tag T)
Definition: Dwarf.cpp:51
llvm::dwarf::AtomTypeString
StringRef AtomTypeString(unsigned Atom)
Definition: Dwarf.cpp:587
llvm::dwarf::DW_INVALID_OFFSET
const uint32_t DW_INVALID_OFFSET
Identifier of an invalid DIE offset in the .debug_info section.
Definition: Dwarf.h:103
llvm::dwarf::CallFrameString
StringRef CallFrameString(unsigned Encoding, Triple::ArchType Arch)
Definition: Dwarf.cpp:536
llvm::dwarf::GIEK_UNUSED6
@ GIEK_UNUSED6
Definition: Dwarf.h:538
llvm::dwarf::DW_CC_lo_user
@ DW_CC_lo_user
Definition: Dwarf.h:339
llvm::dwarf::LNExtendedString
StringRef LNExtendedString(unsigned Encoding)
Definition: Dwarf.cpp:446
llvm::dwarf::DW_CFA_hi_user
@ DW_CFA_hi_user
Definition: Dwarf.h:429
llvm::Triple::ArchType
ArchType
Definition: Triple.h:46
llvm::dwarf::DW_EH_PE_indirect
@ DW_EH_PE_indirect
Definition: Dwarf.h:453
llvm::dwarf::LanguageString
StringRef LanguageString(unsigned Language)
Definition: Dwarf.cpp:327
llvm::dwarf::DW_TAG_hi_user
@ DW_TAG_hi_user
Definition: Dwarf.h:109
llvm::dwarf::computeTombstoneAddress
uint64_t computeTombstoneAddress(uint8_t AddressByteSize)
Definition: Dwarf.h:780
E
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
llvm::dwarf::AttributeValueString
StringRef AttributeValueString(uint16_t Attr, unsigned Val)
Returns the symbolic string representing Val when used as a value for attribute Attr.
Definition: Dwarf.cpp:639
llvm::dwarf::DW_DS_trailing_overpunch
@ DW_DS_trailing_overpunch
Definition: Dwarf.h:162
llvm::dwarf::DW_ATOM_die_tag
@ DW_ATOM_die_tag
Definition: Dwarf.h:512
llvm::AMDGPU::HSAMD::Kernel::Key::Language
constexpr char Language[]
Key for Kernel::Metadata::mLanguage.
Definition: AMDGPUMetadata.h:388
llvm::dwarf::DW_EH_PE_udata2
@ DW_EH_PE_udata2
Definition: Dwarf.h:440
llvm::dwarf::PubIndexEntryDescriptor::toBits
uint8_t toBits() const
Definition: Dwarf.h:735
llvm::dwarf::DW_ATOM_type_type_flags
@ DW_ATOM_type_type_flags
Definition: Dwarf.h:515
llvm::dwarf::getTag
unsigned getTag(StringRef TagString)
Definition: Dwarf.cpp:32
llvm::dwarf::DW_LNE_hi_user
@ DW_LNE_hi_user
Definition: Dwarf.h:374
llvm::dwarf::DW_FLAG_type_implementation
@ DW_FLAG_type_implementation
Definition: Dwarf.h:522
llvm::dwarf::DW_ATOM_cu_offset
@ DW_ATOM_cu_offset
Definition: Dwarf.h:510
llvm::dwarf::LanguageVersion
unsigned LanguageVersion(SourceLanguage L)
Definition: Dwarf.cpp:346
llvm::dwarf::LanguageLowerBound
Optional< unsigned > LanguageLowerBound(SourceLanguage L)
Definition: Dwarf.cpp:368
llvm::dwarf::DWARF_VENDOR_SUN
@ DWARF_VENDOR_SUN
Definition: Dwarf.h:87
UINT64_MAX
#define UINT64_MAX
Definition: DataTypes.h:77
llvm::dwarf::DW_CC_hi_user
@ DW_CC_hi_user
Definition: Dwarf.h:340
llvm::dwarf::Index
Index
Definition: Dwarf.h:472
llvm::dwarf::MacroEntryType
MacroEntryType
DWARF v5 macro information entry type encodings.
Definition: Dwarf.h:394
llvm::dwarf::FormatString
StringRef FormatString(DwarfFormat Format)
Definition: Dwarf.cpp:790
llvm::dwarf::DW_LENGTH_lo_reserved
@ DW_LENGTH_lo_reserved
Special values for an initial length field.
Definition: Dwarf.h:56
llvm::dwarf::VisibilityString
StringRef VisibilityString(unsigned Visibility)
Definition: Dwarf.cpp:296
llvm::dwarf::DW_CFA_lo_user
@ DW_CFA_lo_user
Definition: Dwarf.h:428
llvm::dwarf::EndianityEncoding
EndianityEncoding
Definition: Dwarf.h:167
llvm::raw_ostream
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:54
llvm::IndexedInstrProf::Version
const uint64_t Version
Definition: InstrProf.h:1027
llvm::dwarf::LineNumberExtendedOps
LineNumberExtendedOps
Line Number Extended Opcode Encodings.
Definition: Dwarf.h:370
llvm::dwarf::AccessAttribute
AccessAttribute
Definition: Dwarf.h:175
llvm::dwarf::GDBIndexEntryKindString
StringRef GDBIndexEntryKindString(GDBIndexEntryKind Kind)
Definition: Dwarf.cpp:606
llvm::dwarf::DwarfFormat
DwarfFormat
Constants that define the DWARF format as 32 or 64 bit.
Definition: Dwarf.h:93
llvm::lltok::Kind
Kind
Definition: LLToken.h:18
llvm::dwarf::DWARF_VENDOR_INTEL
@ DWARF_VENDOR_INTEL
Definition: Dwarf.h:85
llvm::dwarf::FormEncodingString
StringRef FormEncodingString(unsigned Encoding)
Definition: Dwarf.cpp:105
llvm::dwarf::DW_EH_PE_funcrel
@ DW_EH_PE_funcrel
Definition: Dwarf.h:451
llvm::dwarf::DWARF_VENDOR_IBM
@ DWARF_VENDOR_IBM
Definition: Dwarf.h:84
llvm::dwarf::DW_FORM_lo_user
@ DW_FORM_lo_user
Not specified by DWARF.
Definition: Dwarf.h:135
llvm::dwarf::DW_IDX_hi_user
@ DW_IDX_hi_user
Definition: Dwarf.h:476
llvm::dwarf::DW_EH_PE_udata4
@ DW_EH_PE_udata4
Definition: Dwarf.h:441
llvm::dwarf::DW_UT_lo_user
@ DW_UT_lo_user
Definition: Dwarf.h:468
llvm::dwarf::DWARF_VENDOR_GHS
@ DWARF_VENDOR_GHS
Definition: Dwarf.h:81
llvm::dwarf::DW_LANG_lo_user
@ DW_LANG_lo_user
Definition: Dwarf.h:205
llvm::dwarf::PubIndexEntryDescriptor::Linkage
GDBIndexEntryLinkage Linkage
Definition: Dwarf.h:725
llvm::dwarf::DW_ORD_row_major
@ DW_ORD_row_major
Definition: Dwarf.h:353
llvm::RISCVFenceField::O
@ O
Definition: RISCVBaseInfo.h:239
llvm::dwarf::DW_OP_LLVM_entry_value
@ DW_OP_LLVM_entry_value
Only used in LLVM metadata.
Definition: Dwarf.h:146
llvm::dwarf::DW_INL_inlined
@ DW_INL_inlined
Definition: Dwarf.h:346
llvm::dwarf::DW_EH_PE_udata8
@ DW_EH_PE_udata8
Definition: Dwarf.h:442
llvm::dwarf::getLanguage
unsigned getLanguage(StringRef LanguageString)
Definition: Dwarf.cpp:338
llvm::dwarf::VisibilityAttribute
VisibilityAttribute
Definition: Dwarf.h:182
llvm::dwarf::isType
bool isType(Tag T)
Definition: Dwarf.h:113
uint64_t
llvm::dwarf::DW_EH_PE_pcrel
@ DW_EH_PE_pcrel
Definition: Dwarf.h:448
llvm::dwarf::DW_ID_down_case
@ DW_ID_down_case
Definition: Dwarf.h:331
llvm::dwarf::FormParams::DwarfUsesRelocationsAcrossSections
bool DwarfUsesRelocationsAcrossSections
True if DWARF v2 output generally uses relocations for references to other .debug_* sections.
Definition: Dwarf.h:659
llvm::dwarf::TagVersion
unsigned TagVersion(Tag T)
Definition: Dwarf.cpp:40
llvm::dwarf::DW_VIS_local
@ DW_VIS_local
Definition: Dwarf.h:184
llvm::dwarf::DefaultedMemberString
StringRef DefaultedMemberString(unsigned DefaultedEncodings)
Definition: Dwarf.cpp:283
llvm::dwarf::getUnitLengthFieldByteSize
uint8_t getUnitLengthFieldByteSize(DwarfFormat Format)
Get the byte size of the unit length field depending on the DWARF format.
Definition: Dwarf.h:679
llvm::format_provider< Enum, std::enable_if_t< dwarf::EnumTraits< Enum >::value > >::format
static void format(const Enum &E, raw_ostream &OS, StringRef Style)
Definition: Dwarf.h:793
llvm::HexStyle::Style
Style
Definition: MCInstPrinter.h:32
llvm::dwarf::DWARF_VENDOR_UPC
@ DWARF_VENDOR_UPC
Definition: Dwarf.h:88
llvm::dwarf::DW_ACCESS_public
@ DW_ACCESS_public
Definition: Dwarf.h:177
llvm::dwarf::FormParams
A helper struct providing information about the byte size of DW_FORM values that vary in size dependi...
Definition: Dwarf.h:653
llvm::dwarf::UnitType
UnitType
Constants for unit types in DWARF v5.
Definition: Dwarf.h:465
llvm::dwarf::AttributeVersion
unsigned AttributeVersion(Attribute A)
Definition: Dwarf.cpp:83
FormatVariadicDetails.h
llvm::dwarf::DWARF_VENDOR_HP
@ DWARF_VENDOR_HP
Definition: Dwarf.h:83
llvm::dwarf::DW_ARANGES_VERSION
@ DW_ARANGES_VERSION
Section version number for .debug_aranges.
Definition: Dwarf.h:66
llvm::dwarf::FormParams::getDwarfOffsetByteSize
uint8_t getDwarfOffsetByteSize() const
The size of a reference is determined by the DWARF 32/64-bit format.
Definition: Dwarf.h:671
llvm::dwarf::DW_OP_lo_user
@ DW_OP_lo_user
Definition: Dwarf.h:141
llvm::dwarf::FormVendor
unsigned FormVendor(Form F)
Definition: Dwarf.cpp:127
llvm::dwarf::DW_IDX_lo_user
@ DW_IDX_lo_user
Definition: Dwarf.h:475
llvm::dwarf::DW_MACRO_GNU_lo_user
@ DW_MACRO_GNU_lo_user
Definition: Dwarf.h:405
llvm::dwarf::PubIndexEntryDescriptor::PubIndexEntryDescriptor
PubIndexEntryDescriptor(GDBIndexEntryKind Kind, GDBIndexEntryLinkage Linkage)
Definition: Dwarf.h:726
llvm::dwarf::GIEK_UNUSED5
@ GIEK_UNUSED5
Definition: Dwarf.h:537
llvm::dwarf::DW_END_lo_user
@ DW_END_lo_user
Definition: Dwarf.h:171
Triple.h
llvm::dwarf::DW_INL_declared_inlined
@ DW_INL_declared_inlined
Definition: Dwarf.h:348
llvm::dwarf::DW_EH_PE_datarel
@ DW_EH_PE_datarel
Definition: Dwarf.h:450
llvm::dwarf::SourceLanguage
SourceLanguage
Definition: Dwarf.h:201
llvm::dwarf::DW_OP_LLVM_arg
@ DW_OP_LLVM_arg
Only used in LLVM metadata.
Definition: Dwarf.h:148
llvm::dwarf::getAttributeEncoding
unsigned getAttributeEncoding(StringRef EncodingString)
Definition: Dwarf.cpp:208
llvm::dwarf::isFortran
bool isFortran(SourceLanguage S)
Definition: Dwarf.h:266
llvm::dwarf::ArrayOrderString
StringRef ArrayOrderString(unsigned Order)
Definition: Dwarf.cpp:425
llvm::dwarf::CaseString
StringRef CaseString(unsigned Case)
Definition: Dwarf.cpp:379
llvm::dwarf::DW_OP_LLVM_fragment
@ DW_OP_LLVM_fragment
Only used in LLVM metadata.
Definition: Dwarf.h:143
llvm::dwarf::DW_EH_PE_uleb128
@ DW_EH_PE_uleb128
Definition: Dwarf.h:439
llvm::dwarf::DW_DS_unsigned
@ DW_DS_unsigned
Definition: Dwarf.h:160
llvm::dwarf::DW_OP_LLVM_implicit_pointer
@ DW_OP_LLVM_implicit_pointer
Only used in LLVM metadata.
Definition: Dwarf.h:147
llvm::dwarf::DW_TAG_invalid
@ DW_TAG_invalid
LLVM mock tags (see also llvm/BinaryFormat/Dwarf.def).
Definition: Dwarf.h:49
llvm::dwarf::DW_ACCESS_private
@ DW_ACCESS_private
Definition: Dwarf.h:179
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:58
llvm::dwarf::DW_LNCT_hi_user
@ DW_LNCT_hi_user
Definition: Dwarf.h:381
llvm_unreachable
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
Definition: ErrorHandling.h:143
llvm::dwarf::LanguageVendor
unsigned LanguageVendor(SourceLanguage L)
Definition: Dwarf.cpp:357
uint32_t
llvm::dwarf::DW_MACINFO_vendor_ext
@ DW_MACINFO_vendor_ext
Definition: Dwarf.h:390
Compiler.h
llvm::dwarf::ApplePropertyAttributes
ApplePropertyAttributes
Constants for the DW_APPLE_PROPERTY_attributes attribute.
Definition: Dwarf.h:459
llvm::dwarf::ApplePropertyString
StringRef ApplePropertyString(unsigned)
Definition: Dwarf.cpp:565
S
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
Definition: README.txt:210
llvm::dwarf::AtomValueString
StringRef AtomValueString(uint16_t Atom, unsigned Val)
Returns the symbolic string representing Val when used as a value for atom Atom.
Definition: Dwarf.cpp:672
llvm::dwarf::PubIndexEntryDescriptor::Kind
GDBIndexEntryKind Kind
Definition: Dwarf.h:724
llvm::dwarf::DW_MACINFO_define
@ DW_MACINFO_define
Definition: Dwarf.h:386
llvm::format
format_object< Ts... > format(const char *Fmt, const Ts &... Vals)
These are helper functions used to produce formatted output.
Definition: Format.h:124
llvm::dwarf::RnglistEntries
RnglistEntries
DWARF v5 range list entry encoding values.
Definition: Dwarf.h:410
llvm::dwarf::ChildrenString
StringRef ChildrenString(unsigned Children)
Definition: Dwarf.cpp:62
llvm::dwarf::GIEK_UNUSED7
@ GIEK_UNUSED7
Definition: Dwarf.h:539
llvm::dwarf::getArrayIndexTypeEncoding
TypeKind getArrayIndexTypeEncoding(SourceLanguage S)
Definition: Dwarf.h:323
llvm::dwarf::DWARF_VENDOR_GOOGLE
@ DWARF_VENDOR_GOOGLE
Definition: Dwarf.h:75
llvm::cl::Optional
@ Optional
Definition: CommandLine.h:115
llvm::dwarf::ConventionString
StringRef ConventionString(unsigned Convention)
Definition: Dwarf.cpp:393
llvm::dwarf::getFixedFormByteSize
Optional< uint8_t > getFixedFormByteSize(dwarf::Form Form, FormParams Params)
Get the fixed byte size for a given form.
Definition: Dwarf.cpp:694
llvm::dwarf::DW_CFA_extended
@ DW_CFA_extended
Definition: Dwarf.h:426
llvm::dwarf::DW_EH_PE_sleb128
@ DW_EH_PE_sleb128
Definition: Dwarf.h:443
llvm::dwarf::DW_EH_PE_absptr
@ DW_EH_PE_absptr
Definition: Dwarf.h:437
llvm::dwarf::GIEK_FUNCTION
@ GIEK_FUNCTION
Definition: Dwarf.h:535
llvm::dwarf::TypeKind
TypeKind
Definition: Dwarf.h:151
std
Definition: BitVector.h:851
llvm::dwarf::getOperationEncoding
unsigned getOperationEncoding(StringRef OperationEncodingString)
Definition: Dwarf.cpp:161
uint16_t
llvm::dwarf::DW_END_hi_user
@ DW_END_hi_user
Definition: Dwarf.h:172
llvm::dwarf::DW_CIE_ID
const uint32_t DW_CIE_ID
Special ID values that distinguish a CIE from a FDE in DWARF CFI.
Definition: Dwarf.h:98
llvm::dwarf::DWARF_VENDOR_GO
@ DWARF_VENDOR_GO
Definition: Dwarf.h:82
llvm::dwarf::DW_PUBNAMES_VERSION
@ DW_PUBNAMES_VERSION
Section version number for .debug_pubnames.
Definition: Dwarf.h:65
llvm::dwarf::GIEK_NONE
@ GIEK_NONE
Definition: Dwarf.h:532
llvm::dwarf::DWARF_VENDOR_ALTIUM
@ DWARF_VENDOR_ALTIUM
Definition: Dwarf.h:79
llvm::dwarf::DW_DS_leading_separate
@ DW_DS_leading_separate
Definition: Dwarf.h:163
llvm::dwarf::DW_MACINFO_start_file
@ DW_MACINFO_start_file
Definition: Dwarf.h:388
llvm::dwarf::EndianityString
StringRef EndianityString(unsigned Endian)
Definition: Dwarf.cpp:254
llvm::dwarf::DW_MACRO_GNU_hi_user
@ DW_MACRO_GNU_hi_user
Definition: Dwarf.h:406
llvm::dwarf::DW_VIRTUALITY_invalid
@ DW_VIRTUALITY_invalid
Virtuality for invalid results.
Definition: Dwarf.h:50
llvm::dwarf::DW_DEFAULTED_max
@ DW_DEFAULTED_max
Definition: Dwarf.h:198
llvm::dwarf::DW_DS_trailing_separate
@ DW_DS_trailing_separate
Definition: Dwarf.h:164
llvm::dwarf::DW_MACINFO_undef
@ DW_MACINFO_undef
Definition: Dwarf.h:387
llvm::dwarf::DWARF_VENDOR_DWARF
@ DWARF_VENDOR_DWARF
Identifiers we use to distinguish vendor extensions.
Definition: Dwarf.h:71
llvm::dwarf::isCPlusPlus
bool isCPlusPlus(SourceLanguage S)
Definition: Dwarf.h:209
llvm::dwarf::DW_ID_case_insensitive
@ DW_ID_case_insensitive
Definition: Dwarf.h:332
llvm::dwarf::DWARF_VENDOR_BORLAND
@ DWARF_VENDOR_BORLAND
Definition: Dwarf.h:73
llvm::dwarf::VirtualityAttribute
VirtualityAttribute
Definition: Dwarf.h:189
llvm::dwarf::DW_OP_LLVM_convert
@ DW_OP_LLVM_convert
Only used in LLVM metadata.
Definition: Dwarf.h:144
llvm::dwarf::AcceleratorTable
AcceleratorTable
Definition: Dwarf.h:506
llvm::dwarf::PubIndexEntryDescriptor
Describes an entry of the various gnu_pub* debug sections.
Definition: Dwarf.h:723
llvm::dwarf::LNStandardString
StringRef LNStandardString(unsigned Standard)
Definition: Dwarf.cpp:435
llvm::dwarf::isValidFormForVersion
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:781
llvm::dwarf::FormParams::Version
uint16_t Version
Definition: Dwarf.h:654
llvm::dwarf::DW_CHILDREN_no
@ DW_CHILDREN_no
Definition: Dwarf.h:434
llvm::dwarf::DiscriminantList
DiscriminantList
Definition: Dwarf.h:357
llvm::dwarf::OperationVendor
unsigned OperationVendor(LocationAtom O)
Definition: Dwarf.cpp:186
llvm::dwarf::DW_hash_function_djb
@ DW_hash_function_djb
Definition: Dwarf.h:527
llvm::dwarf::MacinfoString
StringRef MacinfoString(unsigned Encoding)
Definition: Dwarf.cpp:457
llvm::dwarf::DWARF_VENDOR_WASM
@ DWARF_VENDOR_WASM
Definition: Dwarf.h:78
llvm::dwarf::DW_TAG_user_base
@ DW_TAG_user_base
Recommended base for user tags.
Definition: Dwarf.h:110
llvm::dwarf::DW_ID_case_sensitive
@ DW_ID_case_sensitive
Definition: Dwarf.h:329
llvm::dwarf::DW_MACINFO_invalid
@ DW_MACINFO_invalid
Macinfo type for invalid results.
Definition: Dwarf.h:51
llvm::dwarf::getMacro
unsigned getMacro(StringRef MacroString)
Definition: Dwarf.cpp:508
llvm::dwarf::DWARF_VENDOR_LLVM
@ DWARF_VENDOR_LLVM
Definition: Dwarf.h:76
llvm::dwarf::DW_EH_PE_omit
@ DW_EH_PE_omit
Definition: Dwarf.h:438
llvm::dwarf::DW_LANG_hi_user
@ DW_LANG_hi_user
Definition: Dwarf.h:206
llvm::dwarf::GIEK_OTHER
@ GIEK_OTHER
Definition: Dwarf.h:536
llvm::dwarf::DW_EH_PE_sdata2
@ DW_EH_PE_sdata2
Definition: Dwarf.h:444
llvm::dwarf::OperationVersion
unsigned OperationVersion(LocationAtom O)
Definition: Dwarf.cpp:175
llvm::dwarf::DW_ATE_hi_user
@ DW_ATE_hi_user
Definition: Dwarf.h:155
llvm::dwarf::RLEString
StringRef RLEString(unsigned RLE)
Definition: Dwarf.cpp:804
llvm::dwarf::LineNumberOps
LineNumberOps
Line Number Standard Opcode Encodings.
Definition: Dwarf.h:364
DataTypes.h
llvm::dwarf::DW_EH_PE_aligned
@ DW_EH_PE_aligned
Definition: Dwarf.h:452
llvm::dwarf::InlineCodeString
StringRef InlineCodeString(unsigned Code)
Definition: Dwarf.cpp:411
llvm::dwarf::DWARF64
@ DWARF64
Definition: Dwarf.h:93
llvm::dwarf::DW_ATOM_type_flags
@ DW_ATOM_type_flags
Definition: Dwarf.h:513
llvm::dwarf::DefaultedMemberAttribute
DefaultedMemberAttribute
Definition: Dwarf.h:195
llvm::dwarf::TagString
StringRef TagString(unsigned Tag)
Definition: Dwarf.cpp:21
llvm::dwarf::DW_DS_leading_overpunch
@ DW_DS_leading_overpunch
Definition: Dwarf.h:161
llvm::dwarf::DW_AT_hi_user
@ DW_AT_hi_user
Definition: Dwarf.h:129
llvm::dwarf::DW64_CIE_ID
const uint64_t DW64_CIE_ID
Definition: Dwarf.h:99
llvm::dwarf::DW_EH_PE_signed
@ DW_EH_PE_signed
Definition: Dwarf.h:447
llvm::dwarf::DW_DSC_range
@ DW_DSC_range
Definition: Dwarf.h:360
llvm::dwarf::getDwarfOffsetByteSize
uint8_t getDwarfOffsetByteSize(DwarfFormat Format)
The size of a reference determined by the DWARF 32/64-bit format.
Definition: Dwarf.h:640
llvm::dwarf::DecimalSignString
StringRef DecimalSignString(unsigned Sign)
Definition: Dwarf.cpp:238
llvm::dwarf::AttributeEncodingVersion
unsigned AttributeEncodingVersion(TypeKind E)
Definition: Dwarf.cpp:216
llvm::dwarf::getMacinfo
unsigned getMacinfo(StringRef MacinfoString)
Definition: Dwarf.cpp:476
llvm::dwarf::UnitTypeString
StringRef UnitTypeString(unsigned)
Definition: Dwarf.cpp:576
llvm::Value
LLVM Value Representation.
Definition: Value.h:74
llvm::dwarf::GDBIndexEntryLinkage
GDBIndexEntryLinkage
Definition: Dwarf.h:542
llvm::dwarf::AttributeString
StringRef AttributeString(unsigned Attribute)
Definition: Dwarf.cpp:72
llvm::dwarf::DW_ID_up_case
@ DW_ID_up_case
Definition: Dwarf.h:330
llvm::dwarf::OperationEncodingString
StringRef OperationEncodingString(unsigned Encoding)
Definition: Dwarf.cpp:138
llvm::dwarf::LocListEncodingString
StringRef LocListEncodingString(unsigned Encoding)
Definition: Dwarf.cpp:525
llvm::dwarf::LocationAtom
LocationAtom
Definition: Dwarf.h:138
llvm::dwarf::DWARF32
@ DWARF32
Definition: Dwarf.h:93
llvm::dwarf::EnumTraits
Definition: Dwarf.h:748
llvm::dwarf::MacinfoRecordType
MacinfoRecordType
Definition: Dwarf.h:384
llvm::dwarf::FormParams::getRefAddrByteSize
uint8_t getRefAddrByteSize() const
The definition of the size of form DW_FORM_ref_addr depends on the version.
Definition: Dwarf.h:664
llvm::dwarf::CaseSensitivity
CaseSensitivity
Definition: Dwarf.h:327
llvm::dwarf::DW_DSC_label
@ DW_DSC_label
Definition: Dwarf.h:359