LLVM: include/llvm/DebugInfo/DWARF/DWARFDebugInfoEntry.h Source File (original) (raw)

Go to the documentation of this file.

1

2

3

4

5

6

7

8

9#ifndef LLVM_DEBUGINFO_DWARF_DWARFDEBUGINFOENTRY_H

10#define LLVM_DEBUGINFO_DWARF_DWARFDEBUGINFOENTRY_H

11

15#include

16

17namespace llvm {

18

21

22

24

26

27

28 uint32_t ParentIdx = UINT32_MAX;

29

30

32

34

35public:

37

38

39

40

41

45

47

48

50 if (ParentIdx == UINT32_MAX)

51 return std::nullopt;

52

53 return ParentIdx;

54 }

55

56

58 if (SiblingIdx == 0)

59 return std::nullopt;

60

61 return SiblingIdx;

62 }

63

64

66

68 return AbbrevDecl ? AbbrevDecl->getTag() : dwarf::DW_TAG_null;

69 }

70

71 bool hasChildren() const { return AbbrevDecl && AbbrevDecl->hasChildren(); }

72

74 return AbbrevDecl;

75 }

76};

77

78}

79

80#endif

This file contains constants used for implementing Dwarf debug support.

void setSiblingIdx(uint32_t Idx)

Set index of sibling.

Definition DWARFDebugInfoEntry.h:65

dwarf::Tag getTag() const

Definition DWARFDebugInfoEntry.h:67

DWARFDebugInfoEntry()=default

std::optional< uint32_t > getSiblingIdx() const

Returns index of the sibling die.

Definition DWARFDebugInfoEntry.h:57

uint64_t getOffset() const

Definition DWARFDebugInfoEntry.h:46

LLVM_ABI bool extractFast(const DWARFUnit &U, uint64_t *OffsetPtr, const DWARFDataExtractor &DebugInfoData, uint64_t UEndOffset, uint32_t ParentIdx)

Extracts a debug info entry, which is a child of a given unit, starting at a given offset.

std::optional< uint32_t > getParentIdx() const

Returns index of the parent die.

Definition DWARFDebugInfoEntry.h:49

bool hasChildren() const

Definition DWARFDebugInfoEntry.h:71

const DWARFAbbreviationDeclaration * getAbbreviationDeclarationPtr() const

Definition DWARFDebugInfoEntry.h:73

This is an optimization pass for GlobalISel generic memory operations.