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

1

2

3

4

5

6

7

8

9#ifndef LLVM_DEBUGINFO_DWARF_DWARFDEBUGMACRO_H

10#define LLVM_DEBUGINFO_DWARF_DWARFDEBUGMACRO_H

11

16#include

17

18namespace llvm {

19

20class raw_ostream;

21

22namespace dwarf_linker {

23namespace classic {

25}

26}

27

31

32

33 enum HeaderFlagMask {

34#define HANDLE_MACRO_FLAG(ID, NAME) MACRO_##NAME = ID,

35#include "llvm/BinaryFormat/Dwarf.def"

36 };

37 struct MacroHeader {

38

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

56

57

58

59

60

61

63

64

65 void dumpMacroHeader(raw_ostream &OS) const;

66

67

69

70

72

73

74 uint8_t getOffsetByteSize() const;

75 };

76

77

79

81 union {

82

84

86

88 };

89

90 union {

91

92 const char *MacroStr;

93

95

96 const char *ExtStr;

97 };

98 };

99

100 struct MacroList {

101

102

103

104 MacroHeader Header;

105 SmallVector<Entry, 4> Macros;

107

108

109 bool IsDebugMacro;

110 };

111

112

113 std::vector MacroLists;

114

115public:

117

118

120

124 return parseImpl(Units, StringExtractor, MacroData, true);

125 }

126

128 return parseImpl(std::nullopt, std::nullopt, MacroData, false);

129 }

130

131

132 bool empty() const { return MacroLists.empty(); }

133

135 for (const MacroList &List : MacroLists)

137 return true;

138

139 return false;

140 }

141

142private:

143

144

145 Error parseImpl(std::optionalDWARFUnitVector::compile\_unit\_range Units,

146 std::optional StringExtractor,

148};

149

150}

151

152#endif

This file defines the SmallVector class.

DWARFDebugMacro()=default

void dump(raw_ostream &OS) const

Print the macro list found within the debug_macinfo/debug_macro section.

Error parseMacinfo(DWARFDataExtractor MacroData)

bool empty() const

Return whether the section has any entries.

Error parseMacro(DWARFUnitVector::compile_unit_range Units, DataExtractor StringExtractor, DWARFDataExtractor MacroData)

bool hasEntryForOffset(uint64_t Offset) const

decltype(make_filter_range(std::declval< iterator_range >(), isCompileUnit)) compile_unit_range

Lightweight error class with error context and mandatory checking.

User of DwarfStreamer should call initialization code for AsmPrinter:

Stores all information related to a compile unit, be it in its original instance of the object file o...

This class implements an extremely fast bulk output stream that can only output to a stream.

DwarfFormat

Constants that define the DWARF format as 32 or 64 bit.

Type

MessagePack types as defined in the standard, with the exception of Integer being divided into a sign...

This is an optimization pass for GlobalISel generic memory operations.