#ifndef LLVM_BINARYFORMAT_DWARF_H
#define LLVM_BINARYFORMAT_DWARF_H
#include "llvm/Support/Compiler.h"
#include "llvm/Support/DataTypes.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/FormatVariadicDetails.h"
#include "llvm/TargetParser/Triple.h"
#include <limits>
namespace llvm {
class StringRef;
namespace dwarf {
enum LLVMConstants : uint32_t { … };
enum DwarfFormat : uint8_t { … };
const uint32_t DW_CIE_ID = …;
const uint64_t DW64_CIE_ID = …;
const uint32_t DW_INVALID_OFFSET = …;
enum Tag : uint16_t { … };
inline bool isType(Tag T) { … }
enum Attribute : uint16_t { … };
enum Form : uint16_t { … };
enum LocationAtom { … };
enum LlvmUserLocationAtom { … };
enum TypeKind : uint8_t { … };
enum DecimalSignEncoding { … };
enum EndianityEncoding { … };
enum AccessAttribute { … };
enum VisibilityAttribute { … };
enum VirtualityAttribute { … };
enum DefaultedMemberAttribute { … };
enum SourceLanguage { … };
enum SourceLanguageName : uint16_t { … };
inline std::optional<SourceLanguage> toDW_LANG(SourceLanguageName name,
uint32_t version) { … }
inline std::optional<std::pair<SourceLanguageName, uint32_t>>
toDW_LNAME(SourceLanguage language) { … }
llvm::StringRef LanguageDescription(SourceLanguageName name);
inline bool isCPlusPlus(SourceLanguage S) { … }
inline bool isFortran(SourceLanguage S) { … }
inline bool isC(SourceLanguage S) { … }
inline TypeKind getArrayIndexTypeEncoding(SourceLanguage S) { … }
enum CaseSensitivity { … };
enum CallingConvention { … };
enum InlineAttribute { … };
enum ArrayDimensionOrdering { … };
enum DiscriminantList { … };
enum LineNumberOps : uint8_t { … };
enum LineNumberExtendedOps { … };
enum LineNumberEntryFormat { … };
enum MacinfoRecordType { … };
enum MacroEntryType { … };
enum GnuMacroEntryType { … };
enum RnglistEntries { … };
enum LoclistEntries { … };
enum CallFrameInfo { … };
enum Constants { … };
enum ApplePropertyAttributes { … };
enum UnitType : unsigned char { … };
enum Index { … };
inline bool isUnitType(uint8_t UnitType) { … }
inline bool isUnitType(dwarf::Tag T) { … }
enum AcceleratorTable { … };
inline uint32_t getDebugNamesBucketCount(uint32_t UniqueHashCount) { … }
enum GDBIndexEntryKind { … };
enum GDBIndexEntryLinkage { … };
StringRef TagString(unsigned Tag);
StringRef ChildrenString(unsigned Children);
StringRef AttributeString(unsigned Attribute);
StringRef FormEncodingString(unsigned Encoding);
StringRef OperationEncodingString(unsigned Encoding);
StringRef SubOperationEncodingString(unsigned OpEncoding,
unsigned SubOpEncoding);
StringRef AttributeEncodingString(unsigned Encoding);
StringRef DecimalSignString(unsigned Sign);
StringRef EndianityString(unsigned Endian);
StringRef AccessibilityString(unsigned Access);
StringRef DefaultedMemberString(unsigned DefaultedEncodings);
StringRef VisibilityString(unsigned Visibility);
StringRef VirtualityString(unsigned Virtuality);
StringRef LanguageString(unsigned Language);
StringRef CaseString(unsigned Case);
StringRef ConventionString(unsigned Convention);
StringRef InlineCodeString(unsigned Code);
StringRef ArrayOrderString(unsigned Order);
StringRef LNStandardString(unsigned Standard);
StringRef LNExtendedString(unsigned Encoding);
StringRef MacinfoString(unsigned Encoding);
StringRef MacroString(unsigned Encoding);
StringRef GnuMacroString(unsigned Encoding);
StringRef RangeListEncodingString(unsigned Encoding);
StringRef LocListEncodingString(unsigned Encoding);
StringRef CallFrameString(unsigned Encoding, Triple::ArchType Arch);
StringRef ApplePropertyString(unsigned);
StringRef UnitTypeString(unsigned);
StringRef AtomTypeString(unsigned Atom);
StringRef GDBIndexEntryKindString(GDBIndexEntryKind Kind);
StringRef GDBIndexEntryLinkageString(GDBIndexEntryLinkage Linkage);
StringRef IndexString(unsigned Idx);
StringRef FormatString(DwarfFormat Format);
StringRef FormatString(bool IsDWARF64);
StringRef RLEString(unsigned RLE);
unsigned getTag(StringRef TagString);
unsigned getOperationEncoding(StringRef OperationEncodingString);
unsigned getSubOperationEncoding(unsigned OpEncoding,
StringRef SubOperationEncodingString);
unsigned getVirtuality(StringRef VirtualityString);
unsigned getLanguage(StringRef LanguageString);
unsigned getCallingConvention(StringRef LanguageString);
unsigned getAttributeEncoding(StringRef EncodingString);
unsigned getMacinfo(StringRef MacinfoString);
unsigned getMacro(StringRef MacroString);
unsigned TagVersion(Tag T);
unsigned AttributeVersion(Attribute A);
unsigned FormVersion(Form F);
unsigned OperationVersion(LocationAtom O);
unsigned AttributeEncodingVersion(TypeKind E);
unsigned LanguageVersion(SourceLanguage L);
unsigned TagVendor(Tag T);
unsigned AttributeVendor(Attribute A);
unsigned FormVendor(Form F);
unsigned OperationVendor(LocationAtom O);
unsigned AttributeEncodingVendor(TypeKind E);
unsigned LanguageVendor(SourceLanguage L);
std::optional<unsigned> OperationOperands(LocationAtom O);
std::optional<unsigned> OperationArity(LocationAtom O);
std::optional<unsigned> LanguageLowerBound(SourceLanguage L);
inline uint8_t getDwarfOffsetByteSize(DwarfFormat Format) { … }
struct FormParams { … };
inline uint8_t getUnitLengthFieldByteSize(DwarfFormat Format) { … }
std::optional<uint8_t> getFixedFormByteSize(dwarf::Form Form,
FormParams Params);
bool isValidFormForVersion(Form F, unsigned Version, bool ExtensionsOk = true);
StringRef AttributeValueString(uint16_t Attr, unsigned Val);
StringRef AtomValueString(uint16_t Atom, unsigned Val);
struct PubIndexEntryDescriptor { … };
template <typename Enum> struct EnumTraits : public std::false_type { … };
template <> struct EnumTraits<Attribute> : public std::true_type { … };
template <> struct EnumTraits<Form> : public std::true_type { … };
template <> struct EnumTraits<Index> : public std::true_type { … };
template <> struct EnumTraits<Tag> : public std::true_type { … };
template <> struct EnumTraits<LineNumberOps> : public std::true_type { … };
template <> struct EnumTraits<LocationAtom> : public std::true_type { … };
inline uint64_t computeTombstoneAddress(uint8_t AddressByteSize) { … }
}
format_provider<Enum, std::enable_if_t<dwarf::EnumTraits<Enum>::value>>;
}
#endif