LLVM: include/llvm/DWARFLinker/Classic/DWARFStreamer.h Source File (original) (raw)

46public:

50 : OutFile(OutFile), OutFileType(OutFileType), WarningHandler(Warning) {}

52

56

58

59

60 void finish() override;

61

63

64

65

66 void switchToDebugInfoSection(unsigned DwarfVersion);

67

68

69

70

71

72

73 void emitCompileUnitHeader(CompileUnit &Unit, unsigned DwarfVersion) override;

74

75

76 void emitDIE(DIE &Die) override;

77

78

79 void emitAbbrevs(const std::vector<std::unique_ptr> &Abbrevs,

80 unsigned DwarfVersion) override;

81

82

83 void emitSectionContents(StringRef SecData,

85

86

88

89

90

92 uint16_t TargetDWARFVersion) override;

93

94

96

97

98 void emitSwiftAST(StringRef Buffer);

99

100

101 void emitSwiftReflectionSection(

104

105

106 MCSymbol *emitDwarfDebugRangeListHeader(const CompileUnit &Unit) override;

107

108

109 void emitDwarfDebugRangeListFragment(const CompileUnit &Unit,

113

114

115 void emitDwarfDebugRangeListFooter(const CompileUnit &Unit,

116 MCSymbol *EndLabel) override;

117

118

120

121

123

124

126 uint8_t AddrSize) override;

127

128

129 void emitDwarfDebugAddrsFooter(const CompileUnit &Unit,

130 MCSymbol *EndLabel) override;

131

132

133 void emitDwarfDebugLocListFragment(

137

138

139 void emitDwarfDebugLocListFooter(const CompileUnit &Unit,

140 MCSymbol *EndLabel) override;

141

142

143 void emitDwarfDebugArangesTable(const CompileUnit &Unit,

145

147

149 return RngListsSectionSize;

150 }

151

152

153

154

155 void

159 std::vector<uint64_t> *RowOffsets = nullptr) override;

160

162

163

164 void emitPubNamesForUnit(const CompileUnit &Unit) override;

165

166

167 void emitPubTypesForUnit(const CompileUnit &Unit) override;

168

169

170 void emitCIE(StringRef CIEBytes) override;

171

172

175

176

178

179

180 void emitAppleNamespaces(

182

183

184 void

186

187

188 void

190

191

192 void

194

196

198 return DebugInfoSectionSize;

199 }

200

202 return MacInfoSectionSize;

203 }

204

206 return MacroSectionSize;

207 }

208

210 return LocListsSectionSize;

211 }

212

214

218

219private:

221 if (WarningHandler)

222 WarningHandler(Warning, Context, nullptr);

223 }

224

226

227 void emitMacroTableImpl(const DWARFDebugMacro *MacroTable,

230

231

232 void emitDwarfDebugRangesTableFragment(const CompileUnit &Unit,

235

236

237 void emitDwarfDebugRngListsTableFragment(const CompileUnit &Unit,

241

242

243 void emitDwarfDebugLocTableFragment(

247

248

249 void emitDwarfDebugLocListsTableFragment(

253

254

255

266 void emitLineTablePrologueV2IncludeAndFileTable(

269 void emitLineTablePrologueV5IncludeAndFileTable(

273 MCSymbol *LineEndSym, unsigned AddressByteSize,

274 std::vector<uint64_t> *RowOffsets = nullptr);

279

280

281

282

283 std::unique_ptr MRI;

284 std::unique_ptr MAI;

285 std::unique_ptr MOFI;

286 std::unique_ptr MC;

288 std::unique_ptr MII;

289 std::unique_ptr MSTI;

291 MCStreamer *MS;

292 std::unique_ptr TM;

293 std::unique_ptr Asm;

294

295

296

298 DWARFLinker::OutputFileType OutFileType = DWARFLinker::OutputFileType::Object;

299

300 uint64_t RangesSectionSize = 0;

301 uint64_t RngListsSectionSize = 0;

303 uint64_t LocListsSectionSize = 0;

304 uint64_t LineSectionSize = 0;

305 uint64_t FrameSectionSize = 0;

306 uint64_t DebugInfoSectionSize = 0;

307 uint64_t MacInfoSectionSize = 0;

308 uint64_t MacroSectionSize = 0;

309 uint64_t AddrSectionSize = 0;

310 uint64_t StrOffsetSectionSize = 0;

311

312

313 struct EmittedUnit {

314 unsigned ID;

316 };

317 std::vector EmittedUnits;

318

319

320

323 const std::vectorCompileUnit::AccelInfo &Names);

324

326};