LLVM 17.0.0git
DWARFContext.h
Go to the documentation of this file.
1//===- DWARFContext.h -------------------------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===/
8
9#ifndef LLVM_DEBUGINFO_DWARF_DWARFCONTEXT_H
10#define LLVM_DEBUGINFO_DWARF_DWARFCONTEXT_H
11
13#include "llvm/ADT/StringMap.h"
14#include "llvm/ADT/StringRef.h"
20#include "llvm/Object/Binary.h"
23#include "llvm/Support/Error.h"
24#include "llvm/Support/Host.h"
25#include <cstdint>
26#include <memory>
27
28namespace llvm {
29
30class MemoryBuffer;
31class AppleAcceleratorTable;
32class DWARFCompileUnit;
33class DWARFDebugAbbrev;
34class DWARFDebugAranges;
35class DWARFDebugFrame;
36class DWARFDebugLoc;
37class DWARFDebugMacro;
38class DWARFDebugNames;
39class DWARFGdbIndex;
40class DWARFTypeUnit;
41class DWARFUnitIndex;
42
43/// DWARFContext
44/// This data structure is the top level entity that deals with dwarf debug
45/// information parsing. The actual data is supplied through DWARFObj.
46class DWARFContext : public DIContext {
47 DWARFUnitVector NormalUnits;
48 std::optional<DenseMap<uint64_t, DWARFTypeUnit *>> NormalTypeUnits;
49 std::unique_ptr<DWARFUnitIndex> CUIndex;
50 std::unique_ptr<DWARFGdbIndex> GdbIndex;
51 std::unique_ptr<DWARFUnitIndex> TUIndex;
52 std::unique_ptr<DWARFDebugAbbrev> Abbrev;
53 std::unique_ptr<DWARFDebugLoc> Loc;
54 std::unique_ptr<DWARFDebugAranges> Aranges;
55 std::unique_ptr<DWARFDebugLine> Line;
56 std::unique_ptr<DWARFDebugFrame> DebugFrame;
57 std::unique_ptr<DWARFDebugFrame> EHFrame;
58 std::unique_ptr<DWARFDebugMacro> Macro;
59 std::unique_ptr<DWARFDebugMacro> Macinfo;
60 std::unique_ptr<DWARFDebugNames> Names;
61 std::unique_ptr<AppleAcceleratorTable> AppleNames;
62 std::unique_ptr<AppleAcceleratorTable> AppleTypes;
63 std::unique_ptr<AppleAcceleratorTable> AppleNamespaces;
64 std::unique_ptr<AppleAcceleratorTable> AppleObjC;
65
66 DWARFUnitVector DWOUnits;
67 std::optional<DenseMap<uint64_t, DWARFTypeUnit *>> DWOTypeUnits;
68 std::unique_ptr<DWARFDebugAbbrev> AbbrevDWO;
69 std::unique_ptr<DWARFDebugMacro> MacinfoDWO;
70 std::unique_ptr<DWARFDebugMacro> MacroDWO;
71
72 /// The maximum DWARF version of all units.
73 unsigned MaxVersion = 0;
74
75 struct DWOFile {
77 std::unique_ptr<DWARFContext> Context;
78 };
80 std::weak_ptr<DWOFile> DWP;
81 bool CheckedForDWP = false;
82 std::string DWPName;
83 std::function<void(Error)> RecoverableErrorHandler =
85 std::function<void(Error)> WarningHandler = WithColor::defaultWarningHandler;
86
87 /// Read compile units from the debug_info section (if necessary)
88 /// and type units from the debug_types sections (if necessary)
89 /// and store them in NormalUnits.
90 void parseNormalUnits();
91
92 /// Read compile units from the debug_info.dwo section (if necessary)
93 /// and type units from the debug_types.dwo section (if necessary)
94 /// and store them in DWOUnits.
95 /// If \p Lazy is true, set up to parse but don't actually parse them.
96 enum { EagerParse = false, LazyParse = true };
97 void parseDWOUnits(bool Lazy = false);
98
99 std::unique_ptr<const DWARFObject> DObj;
100
101 /// Helper enum to distinguish between macro[.dwo] and macinfo[.dwo]
102 /// section.
103 enum MacroSecType {
104 MacinfoSection,
105 MacinfoDwoSection,
106 MacroSection,
107 MacroDwoSection
108 };
109
110 // When set parses debug_info.dwo/debug_abbrev.dwo manually and populates CU
111 // Index, and TU Index for DWARF5.
112 bool ParseCUTUIndexManually = false;
113
114public:
115 DWARFContext(std::unique_ptr<const DWARFObject> DObj,
116 std::string DWPName = "",
117 std::function<void(Error)> RecoverableErrorHandler =
119 std::function<void(Error)> WarningHandler =
121 ~DWARFContext() override;
122
125
126 const DWARFObject &getDWARFObj() const { return *DObj; }
127
128 static bool classof(const DIContext *DICtx) {
129 return DICtx->getKind() == CK_DWARF;
130 }
131
132 /// Dump a textual representation to \p OS. If any \p DumpOffsets are present,
133 /// dump only the record at the specified offset.
134 void dump(raw_ostream &OS, DIDumpOptions DumpOpts,
135 std::array<std::optional<uint64_t>, DIDT_ID_Count> DumpOffsets);
136
137 void dump(raw_ostream &OS, DIDumpOptions DumpOpts) override {
138 std::array<std::optional<uint64_t>, DIDT_ID_Count> DumpOffsets;
139 dump(OS, DumpOpts, DumpOffsets);
140 }
141
142 bool verify(raw_ostream &OS, DIDumpOptions DumpOpts = {}) override;
143
146
147 /// Get units from .debug_info in this context.
149 parseNormalUnits();
150 return unit_iterator_range(NormalUnits.begin(),
151 NormalUnits.begin() +
152 NormalUnits.getNumInfoUnits());
153 }
154
156 parseNormalUnits();
157 return NormalUnits;
158 }
159
160 /// Get units from .debug_types in this context.
162 parseNormalUnits();
163 return unit_iterator_range(
164 NormalUnits.begin() + NormalUnits.getNumInfoUnits(), NormalUnits.end());
165 }
166
167 /// Get compile units in this context.
170 }
171
172 // If you want type_units(), it'll need to be a concat iterator of a filter of
173 // TUs in info_section + all the (all type) units in types_section
174
175 /// Get all normal compile/type units in this context.
177 parseNormalUnits();
178 return unit_iterator_range(NormalUnits.begin(), NormalUnits.end());
179 }
180
181 /// Get units from .debug_info..dwo in the DWO context.
183 parseDWOUnits();
184 return unit_iterator_range(DWOUnits.begin(),
185 DWOUnits.begin() + DWOUnits.getNumInfoUnits());
186 }
187
189 parseDWOUnits();
190 return DWOUnits;
191 }
192
193 /// Get units from .debug_types.dwo in the DWO context.
195 parseDWOUnits();
196 return unit_iterator_range(DWOUnits.begin() + DWOUnits.getNumInfoUnits(),
197 DWOUnits.end());
198 }
199
200 /// Get compile units in the DWO context.
203 }
204
205 // If you want dwo_type_units(), it'll need to be a concat iterator of a
206 // filter of TUs in dwo_info_section + all the (all type) units in
207 // dwo_types_section.
208
209 /// Get all units in the DWO context.
211 parseDWOUnits();
212 return unit_iterator_range(DWOUnits.begin(), DWOUnits.end());
213 }
214
215 /// Get the number of compile units in this context.
217 parseNormalUnits();
218 return NormalUnits.getNumInfoUnits();
219 }
220
221 /// Get the number of type units in this context.
222 unsigned getNumTypeUnits() {
223 parseNormalUnits();
224 return NormalUnits.getNumTypesUnits();
225 }
226
227 /// Get the number of compile units in the DWO context.
229 parseDWOUnits();
230 return DWOUnits.getNumInfoUnits();
231 }
232
233 /// Get the number of type units in the DWO context.
235 parseDWOUnits();
236 return DWOUnits.getNumTypesUnits();
237 }
238
239 /// Get the unit at the specified index.
240 DWARFUnit *getUnitAtIndex(unsigned index) {
241 parseNormalUnits();
242 return NormalUnits[index].get();
243 }
244
245 /// Get the unit at the specified index for the DWO units.
246 DWARFUnit *getDWOUnitAtIndex(unsigned index) {
247 parseDWOUnits();
248 return DWOUnits[index].get();
249 }
250
252 DWARFTypeUnit *getTypeUnitForHash(uint16_t Version, uint64_t Hash, bool IsDWO);
253
254 /// Return the compile unit that includes an offset (relative to .debug_info).
256
257 /// Get a DIE given an exact offset.
259
260 unsigned getMaxVersion() {
261 // Ensure info units have been parsed to discover MaxVersion
263 return MaxVersion;
264 }
265
266 unsigned getMaxDWOVersion() {
267 // Ensure DWO info units have been parsed to discover MaxVersion
269 return MaxVersion;
270 }
271
272 void setMaxVersionIfGreater(unsigned Version) {
273 if (Version > MaxVersion)
274 MaxVersion = Version;
275 }
276
277 const DWARFUnitIndex &getCUIndex();
279 const DWARFUnitIndex &getTUIndex();
280
281 /// Get a pointer to the parsed DebugAbbrev object.
283
284 /// Get a pointer to the parsed DebugLoc object.
285 const DWARFDebugLoc *getDebugLoc();
286
287 /// Get a pointer to the parsed dwo abbreviations object.
289
290 /// Get a pointer to the parsed DebugAranges object.
292
293 /// Get a pointer to the parsed frame information object.
295
296 /// Get a pointer to the parsed eh frame information object.
298
299 /// Get a pointer to the parsed DebugMacinfo information object.
301
302 /// Get a pointer to the parsed DebugMacinfoDWO information object.
304
305 /// Get a pointer to the parsed DebugMacro information object.
307
308 /// Get a pointer to the parsed DebugMacroDWO information object.
310
311 /// Get a reference to the parsed accelerator table object.
313
314 /// Get a reference to the parsed accelerator table object.
316
317 /// Get a reference to the parsed accelerator table object.
319
320 /// Get a reference to the parsed accelerator table object.
322
323 /// Get a reference to the parsed accelerator table object.
325
326 /// Get a pointer to a parsed line table corresponding to a compile unit.
327 /// Report any parsing issues as warnings on stderr.
329
330 /// Get a pointer to a parsed line table corresponding to a compile unit.
331 /// Report any recoverable parsing problems using the handler.
334 function_ref<void(Error)> RecoverableErrorHandler);
335
336 // Clear the line table object corresponding to a compile unit for memory
337 // management purpose. When it's referred to again, it'll be re-populated.
339
341 return DataExtractor(DObj->getStrSection(), false, 0);
342 }
344 return DataExtractor(DObj->getStrDWOSection(), false, 0);
345 }
347 return DataExtractor(DObj->getLineStrSection(), false, 0);
348 }
349
350 /// Wraps the returned DIEs for a given address.
355 explicit operator bool() const { return CompileUnit != nullptr; }
356 };
357
358 /// Get the compilation unit, the function DIE and lexical block DIE for the
359 /// given address where applicable.
360 /// TODO: change input parameter from "uint64_t Address"
361 /// into "SectionedAddress Address"
362 DIEsForAddress getDIEsForAddress(uint64_t Address);
363
366 DILineInfoSpecifier Specifier = DILineInfoSpecifier()) override;
371 DILineInfoSpecifier Specifier = DILineInfoSpecifier()) override;
374 DILineInfoSpecifier Specifier = DILineInfoSpecifier()) override;
375
376 std::vector<DILocal>
378
379 bool isLittleEndian() const { return DObj->isLittleEndian(); }
380 static unsigned getMaxSupportedVersion() { return 5; }
381 static bool isSupportedVersion(unsigned version) {
382 return version >= 2 && version <= getMaxSupportedVersion();
383 }
384
386 return {2, 4, 8};
387 }
388 static bool isAddressSizeSupported(unsigned AddressSize) {
389 return llvm::is_contained(getSupportedAddressSizes(), AddressSize);
390 }
391 template <typename... Ts>
392 static Error checkAddressSizeSupported(unsigned AddressSize,
393 std::error_code EC, char const *Fmt,
394 const Ts &...Vals) {
395 if (isAddressSizeSupported(AddressSize))
396 return Error::success();
397 std::string Buffer;
398 raw_string_ostream Stream(Buffer);
399 Stream << format(Fmt, Vals...)
400 << " has unsupported address size: " << AddressSize
401 << " (supported are ";
402 ListSeparator LS;
404 Stream << LS << Size;
405 Stream << ')';
406 return make_error<StringError>(Stream.str(), EC);
407 }
408
409 std::shared_ptr<DWARFContext> getDWOContext(StringRef AbsolutePath);
410
412 return RecoverableErrorHandler;
413 }
414
415 function_ref<void(Error)> getWarningHandler() { return WarningHandler; }
416
418
419 static std::unique_ptr<DWARFContext>
420 create(const object::ObjectFile &Obj,
422 const LoadedObjectInfo *L = nullptr, std::string DWPName = "",
423 std::function<void(Error)> RecoverableErrorHandler =
425 std::function<void(Error)> WarningHandler =
427
428 static std::unique_ptr<DWARFContext>
429 create(const StringMap<std::unique_ptr<MemoryBuffer>> &Sections,
430 uint8_t AddrSize, bool isLittleEndian = sys::IsLittleEndianHost,
431 std::function<void(Error)> RecoverableErrorHandler =
433 std::function<void(Error)> WarningHandler =
435
436 /// Get address size from CUs.
437 /// TODO: refactor compile_units() to make this const.
438 uint8_t getCUAddrSize();
439
441 return getDWARFObj().getFile()->getArch();
442 }
443
444 /// Return the compile unit which contains instruction with provided
445 /// address.
446 /// TODO: change input parameter from "uint64_t Address"
447 /// into "SectionedAddress Address"
449
450 /// Returns whether CU/TU should be populated manually. TU Index populated
451 /// manually only for DWARF5.
452 bool getParseCUTUIndexManually() const { return ParseCUTUIndexManually; }
453
454 /// Sets whether CU/TU should be populated manually. TU Index populated
455 /// manually only for DWARF5.
456 void setParseCUTUIndexManually(bool PCUTU) { ParseCUTUIndexManually = PCUTU; }
457
458private:
459 /// Parse a macro[.dwo] or macinfo[.dwo] section.
460 std::unique_ptr<DWARFDebugMacro>
461 parseMacroOrMacinfo(MacroSecType SectionType);
462
463 void addLocalsForDie(DWARFCompileUnit *CU, DWARFDie Subprogram, DWARFDie Die,
464 std::vector<DILocal> &Result);
465};
466
467} // end namespace llvm
468
469#endif // LLVM_DEBUGINFO_DWARF_DWARFCONTEXT_H
This file defines the StringMap class.
uint64_t Size
LLVMContext & Context
ppc ctr loops verify
This file defines the SmallVector class.
This header is deprecated in favour of llvm/TargetParser/Host.h.
This implements the Apple accelerator table format, a precursor of the DWARF 5 accelerator table form...
Stores all information relating to a compile unit, be it in its original instance in the object file ...
DIContextKind getKind() const
Definition: DIContext.h:236
A format-neutral container for inlined code description.
Definition: DIContext.h:88
DWARFContext This data structure is the top level entity that deals with dwarf debug information pars...
Definition: DWARFContext.h:46
uint8_t getCUAddrSize()
Get address size from CUs.
DIInliningInfo getInliningInfoForAddress(object::SectionedAddress Address, DILineInfoSpecifier Specifier=DILineInfoSpecifier()) override
Expected< const DWARFDebugFrame * > getDebugFrame()
Get a pointer to the parsed frame information object.
DWARFCompileUnit * getCompileUnitForAddress(uint64_t Address)
Return the compile unit which contains instruction with provided address.
static bool isSupportedVersion(unsigned version)
Definition: DWARFContext.h:381
Triple::ArchType getArch() const
Definition: DWARFContext.h:440
function_ref< void(Error)> getRecoverableErrorHandler()
Definition: DWARFContext.h:411
DWARFGdbIndex & getGdbIndex()
unsigned getNumCompileUnits()
Get the number of compile units in this context.
Definition: DWARFContext.h:216
~DWARFContext() override
DWARFUnitVector::compile_unit_range compile_unit_range
Definition: DWARFContext.h:145
static SmallVector< uint8_t, 3 > getSupportedAddressSizes()
Definition: DWARFContext.h:385
DWARFDie getDIEForOffset(uint64_t Offset)
Get a DIE given an exact offset.
unsigned getNumTypeUnits()
Get the number of type units in this context.
Definition: DWARFContext.h:222
DIEsForAddress getDIEsForAddress(uint64_t Address)
Get the compilation unit, the function DIE and lexical block DIE for the given address where applicab...
DWARFUnitVector::iterator_range unit_iterator_range
Definition: DWARFContext.h:144
static bool classof(const DIContext *DICtx)
Definition: DWARFContext.h:128
DILineInfo getLineInfoForAddress(object::SectionedAddress Address, DILineInfoSpecifier Specifier=DILineInfoSpecifier()) override
const DWARFDebugAbbrev * getDebugAbbrevDWO()
Get a pointer to the parsed dwo abbreviations object.
compile_unit_range compile_units()
Get compile units in this context.
Definition: DWARFContext.h:168
const AppleAcceleratorTable & getAppleObjC()
Get a reference to the parsed accelerator table object.
const DWARFUnitIndex & getTUIndex()
unsigned getMaxVersion()
Definition: DWARFContext.h:260
const DWARFDebugAbbrev * getDebugAbbrev()
Get a pointer to the parsed DebugAbbrev object.
DWARFUnit * getDWOUnitAtIndex(unsigned index)
Get the unit at the specified index for the DWO units.
Definition: DWARFContext.h:246
std::vector< DILocal > getLocalsForAddress(object::SectionedAddress Address) override
DataExtractor getStringExtractor() const
Definition: DWARFContext.h:340
void setParseCUTUIndexManually(bool PCUTU)
Sets whether CU/TU should be populated manually.
Definition: DWARFContext.h:456
static std::unique_ptr< DWARFContext > create(const object::ObjectFile &Obj, ProcessDebugRelocations RelocAction=ProcessDebugRelocations::Process, const LoadedObjectInfo *L=nullptr, std::string DWPName="", std::function< void(Error)> RecoverableErrorHandler=WithColor::defaultErrorHandler, std::function< void(Error)> WarningHandler=WithColor::defaultWarningHandler)
DWARFCompileUnit * getCompileUnitForOffset(uint64_t Offset)
Return the compile unit that includes an offset (relative to .debug_info).
const DWARFDebugNames & getDebugNames()
Get a reference to the parsed accelerator table object.
unsigned getNumDWOTypeUnits()
Get the number of type units in the DWO context.
Definition: DWARFContext.h:234
const DWARFDebugMacro * getDebugMacroDWO()
Get a pointer to the parsed DebugMacroDWO information object.
DILineInfoTable getLineInfoForAddressRange(object::SectionedAddress Address, uint64_t Size, DILineInfoSpecifier Specifier=DILineInfoSpecifier()) override
static Error checkAddressSizeSupported(unsigned AddressSize, std::error_code EC, char const *Fmt, const Ts &...Vals)
Definition: DWARFContext.h:392
function_ref< void(Error)> getWarningHandler()
Definition: DWARFContext.h:415
bool isLittleEndian() const
Definition: DWARFContext.h:379
DWARFUnit * getUnitAtIndex(unsigned index)
Get the unit at the specified index.
Definition: DWARFContext.h:240
const DWARFDebugLine::LineTable * getLineTableForUnit(DWARFUnit *U)
Get a pointer to a parsed line table corresponding to a compile unit.
DWARFContext & operator=(DWARFContext &)=delete
void clearLineTableForUnit(DWARFUnit *U)
const AppleAcceleratorTable & getAppleTypes()
Get a reference to the parsed accelerator table object.
const AppleAcceleratorTable & getAppleNames()
Get a reference to the parsed accelerator table object.
void setMaxVersionIfGreater(unsigned Version)
Definition: DWARFContext.h:272
compile_unit_range dwo_compile_units()
Get compile units in the DWO context.
Definition: DWARFContext.h:201
const DWARFUnitVector & getNormalUnitsVector()
Definition: DWARFContext.h:155
const DWARFDebugLoc * getDebugLoc()
Get a pointer to the parsed DebugLoc object.
const DWARFDebugMacro * getDebugMacinfoDWO()
Get a pointer to the parsed DebugMacinfoDWO information object.
unit_iterator_range dwo_types_section_units()
Get units from .debug_types.dwo in the DWO context.
Definition: DWARFContext.h:194
void dump(raw_ostream &OS, DIDumpOptions DumpOpts, std::array< std::optional< uint64_t >, DIDT_ID_Count > DumpOffsets)
Dump a textual representation to OS.
unit_iterator_range normal_units()
Get all normal compile/type units in this context.
Definition: DWARFContext.h:176
static unsigned getMaxSupportedVersion()
Definition: DWARFContext.h:380
unit_iterator_range types_section_units()
Get units from .debug_types in this context.
Definition: DWARFContext.h:161
std::shared_ptr< DWARFContext > getDWOContext(StringRef AbsolutePath)
DWARFCompileUnit * getDWOCompileUnitForHash(uint64_t Hash)
void dump(raw_ostream &OS, DIDumpOptions DumpOpts) override
Definition: DWARFContext.h:137
unsigned getNumDWOCompileUnits()
Get the number of compile units in the DWO context.
Definition: DWARFContext.h:228
DWARFContext(DWARFContext &)=delete
DILineInfo getLineInfoForDataAddress(object::SectionedAddress Address) override
const DWARFDebugAranges * getDebugAranges()
Get a pointer to the parsed DebugAranges object.
const DWARFUnitIndex & getCUIndex()
Expected< const DWARFDebugFrame * > getEHFrame()
Get a pointer to the parsed eh frame information object.
DataExtractor getLineStringExtractor() const
Definition: DWARFContext.h:346
unit_iterator_range info_section_units()
Get units from .debug_info in this context.
Definition: DWARFContext.h:148
DWARFTypeUnit * getTypeUnitForHash(uint16_t Version, uint64_t Hash, bool IsDWO)
bool getParseCUTUIndexManually() const
Returns whether CU/TU should be populated manually.
Definition: DWARFContext.h:452
unit_iterator_range dwo_info_section_units()
Get units from .debug_info..dwo in the DWO context.
Definition: DWARFContext.h:182
DataExtractor getStringDWOExtractor() const
Definition: DWARFContext.h:343
const AppleAcceleratorTable & getAppleNamespaces()
Get a reference to the parsed accelerator table object.
const DWARFDebugMacro * getDebugMacro()
Get a pointer to the parsed DebugMacro information object.
const DWARFDebugMacro * getDebugMacinfo()
Get a pointer to the parsed DebugMacinfo information object.
static bool isAddressSizeSupported(unsigned AddressSize)
Definition: DWARFContext.h:388
const DWARFUnitVector & getDWOUnitsVector()
Definition: DWARFContext.h:188
unit_iterator_range dwo_units()
Get all units in the DWO context.
Definition: DWARFContext.h:210
const DWARFObject & getDWARFObj() const
Definition: DWARFContext.h:126
unsigned getMaxDWOVersion()
Definition: DWARFContext.h:266
.debug_names section consists of one or more units.
Utility class that carries the DWARF compile/type unit and the debug info entry in an object.
Definition: DWARFDie.h:42
virtual const object::ObjectFile * getFile() const
Definition: DWARFObject.h:32
Describe a collection of units.
Definition: DWARFUnit.h:123
unsigned getNumInfoUnits() const
Returns number of units from all .debug_info[.dwo] sections.
Definition: DWARFUnit.h:162
unsigned getNumTypesUnits() const
Returns number of units from all .debug_types[.dwo] sections.
Definition: DWARFUnit.h:166
llvm::iterator_range< typename UnitVector::iterator > iterator_range
Definition: DWARFUnit.h:133
decltype(make_filter_range(std::declval< iterator_range >(), isCompileUnit)) compile_unit_range
Definition: DWARFUnit.h:136
Lightweight error class with error context and mandatory checking.
Definition: Error.h:156
static ErrorSuccess success()
Create a success value.
Definition: Error.h:330
Tagged union holding either a T or a Error.
Definition: Error.h:470
An inferface for inquiring the load address of a loaded object file to be used by the DIContext imple...
Definition: DIContext.h:267
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Definition: SmallVector.h:1200
StringMap - This is an unconventional map that is specialized for handling keys that are "strings",...
Definition: StringMap.h:111
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
static void defaultWarningHandler(Error Warning)
Implement default handling for Warning.
Definition: WithColor.cpp:164
static void defaultErrorHandler(Error Err)
Implement default handling for Error.
Definition: WithColor.cpp:158
An efficient, type-erasing, non-owning reference to a callable.
A range adaptor for a pair of iterators.
This class is the base class for all object file types.
Definition: ObjectFile.h:228
virtual Triple::ArchType getArch() const =0
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:52
A raw_ostream that writes to an std::string.
Definition: raw_ostream.h:642
std::string & str()
Returns the string's reference.
Definition: raw_ostream.h:660
static const bool IsLittleEndianHost
Definition: SwapByteOrder.h:67
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
@ Offset
Definition: DWP.cpp:406
iterator_range< filter_iterator< detail::IterOfRange< RangeT >, PredicateT > > make_filter_range(RangeT &&Range, PredicateT Pred)
Convenience function that takes a range of elements and a predicate, and return a new filter_iterator...
Definition: STLExtras.h:637
format_object< Ts... > format(const char *Fmt, const Ts &... Vals)
These are helper functions used to produce formatted output.
Definition: Format.h:124
bool is_contained(R &&Range, const E &Element)
Wrapper function around std::find to detect if an element exists in a container.
Definition: STLExtras.h:1869
@ DIDT_ID_Count
Definition: DIContext.h:172
bool isCompileUnit(const std::unique_ptr< DWARFUnit > &U)
Definition: DWARFUnit.h:578
Container for dump options that control which debug information will be dumped.
Definition: DIContext.h:189
Controls which fields of DILineInfo container should be filled with data.
Definition: DIContext.h:140
A format-neutral container for source line information.
Definition: DIContext.h:32
Wraps the returned DIEs for a given address.
Definition: DWARFContext.h:351