LLVM: lib/CodeGen/AsmPrinter/DwarfFile.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9#ifndef LLVM_LIB_CODEGEN_ASMPRINTER_DWARFFILE_H

10#define LLVM_LIB_CODEGEN_ASMPRINTER_DWARFFILE_H

11

19#include

20#include

21#include

22

23namespace llvm {

24

37

38

47

55

57

59

61

62

64

65

67

69

70

71

73

74

75

76 MCSymbol *StringOffsetsStartSym = nullptr;

77

78

79

80 MCSymbol *RnglistsTableBaseSym = nullptr;

81

82

83 struct ScopeVars {

84

85

86 std::map<unsigned, DbgVariable *> Args;

88 };

89

91

92

95

96

99

100

102

103

104

105

107

108public:

110

114

117

118

120 return CURangeLists;

121 }

122

123

125

126

128

129

130

132

133

134 void addUnit(std::unique_ptr U);

135

136

137

139

140

142

143

145

146

147

148

149

151 bool UseRelativeOffsets = false);

152

153

155

158

161

163

165

167 return ScopeVariables;

168 }

169

171 return ScopeLabels;

172 }

173

175 return AbstractLocalScopeDIEs;

176 }

177

179 return AbstractEntities;

180 }

181

183 return FinalizedAbstractSubprograms;

184 }

185

187 DITypeNodeToDieMap.insert(std::make_pair(TypeMD, Die));

188 }

189

191 return DITypeNodeToDieMap.lookup(TypeMD);

192 }

193};

194

195}

196

197#endif

This file defines the BumpPtrAllocator interface.

This file defines the DenseMap class.

This file defines the SmallPtrSet class.

This file defines the SmallVector class.

This class is intended to be used as a driving class for all asm writers.

Helps unique DIEAbbrev objects and assigns abbreviation numbers.

A structured debug information entry.

Tagged DWARF-like metadata node.

Subprogram description. Uses SubclassData1.

This class is defined as the common parent of DbgVariable and DbgLabel such that it could levarage po...

This class is used to track label information.

This class is used to track local variable information.

unsigned computeSizeAndOffset(DIE &Die, unsigned Offset)

Compute the size and offset of a DIE given an incoming Offset.

void addScopeLabel(LexicalScope *LS, DbgLabel *Label)

void addUnit(std::unique_ptr< DwarfCompileUnit > U)

Add a unit to the list of CUs.

void computeSizeAndOffsets()

Compute the size and offset of all the DIEs.

void setRnglistsTableBaseSym(MCSymbol *Sym)

Definition DwarfFile.h:160

DenseMap< LexicalScope *, ScopeVars > & getScopeVariables()

Definition DwarfFile.h:166

DenseMap< const DINode *, std::unique_ptr< DbgEntity > > & getAbstractEntities()

Definition DwarfFile.h:178

unsigned computeSizeAndOffsetsForUnit(DwarfUnit *TheU)

Compute the size and offset of all the DIEs in the given unit.

void emitUnits(bool UseOffsets)

Emit all of the units to the section listed with the given abbreviation section.

void emitUnit(DwarfUnit *TheU, bool UseOffsets)

Emit the given unit to its section.

const SmallVectorImpl< RangeSpanList > & getRangeLists() const

getRangeLists - Get the vector of range lists.

Definition DwarfFile.h:119

MCSymbol * getStringOffsetsStartSym() const

Definition DwarfFile.h:156

MCSymbol * getRnglistsTableBaseSym() const

Definition DwarfFile.h:159

DwarfStringPool & getStringPool()

Returns the string pool.

Definition DwarfFile.h:154

void emitAbbrevs(MCSection *)

Emit a set of abbreviations to the specific section.

DwarfFile(AsmPrinter *AP, StringRef Pref, BumpPtrAllocator &DA)

void emitStrings(MCSection *StrSection, MCSection *OffsetSection=nullptr, bool UseRelativeOffsets=false)

Emit all of the strings to the section given.

DenseMap< LexicalScope *, LabelList > & getScopeLabels()

Definition DwarfFile.h:170

void addScopeVariable(LexicalScope *LS, DbgVariable *Var)

std::pair< uint32_t, RangeSpanList * > addRange(const DwarfCompileUnit &CU, SmallVector< RangeSpan, 2 > R)

DenseMap< const DILocalScope *, DIE * > & getAbstractScopeDIEs()

Definition DwarfFile.h:174

void setStringOffsetsStartSym(MCSymbol *Sym)

Definition DwarfFile.h:157

const SmallVectorImpl< std::unique_ptr< DwarfCompileUnit > > & getUnits()

Definition DwarfFile.h:111

void insertDIE(const MDNode *TypeMD, DIE *Die)

Definition DwarfFile.h:186

DIE * getDIE(const MDNode *TypeMD)

Definition DwarfFile.h:190

auto & getFinalizedAbstractSubprograms()

Definition DwarfFile.h:182

This dwarf writer support class manages information associated with a source file.

This class is used to track scope information.

Instances of this class represent a uniqued identifier for a section in the current translation unit.

MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...

SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements.

This class consists of common code factored out of the SmallVector class to reduce code duplication b...

This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.

StringRef - Represent a constant reference to a string, i.e.

This is an optimization pass for GlobalISel generic memory operations.

BumpPtrAllocatorImpl<> BumpPtrAllocator

The standard BumpPtrAllocator which just uses the default template parameters.

Definition DwarfFile.h:48

SmallVector< RangeSpan, 2 > Ranges

Definition DwarfFile.h:53

MCSymbol * Label

Definition DwarfFile.h:50

Definition DwarfFile.h:39

bool operator==(const RangeSpan &Other) const

Definition DwarfFile.h:43

const MCSymbol * End

Definition DwarfFile.h:41

const MCSymbol * Begin

Definition DwarfFile.h:40