14#ifndef LLVM_DEBUGINFO_DICONTEXT_H
15#define LLVM_DEBUGINFO_DICONTEXT_H
35 static constexpr const char *
const BadString =
"<invalid>";
71 std::tie(
RHS.FileName,
RHS.FunctionName,
RHS.StartFileName,
RHS.Line,
72 RHS.Column,
RHS.StartLine,
RHS.Discriminator);
83 OS <<
"line " <<
Line <<
", ";
104 return Frames[
Index];
109 return &Frames[
Index];
174#define HANDLE_DWARF_SECTION(ENUM_NAME, ELF_NAME, CMDLINE_NAME, OPTION) \
176#include "llvm/BinaryFormat/Dwarf.def"
177#undef HANDLE_DWARF_SECTION
181static_assert(
DIDT_ID_Count <= 32,
"section types overflow storage");
187#define HANDLE_DWARF_SECTION(ENUM_NAME, ELF_NAME, CMDLINE_NAME, OPTION) \
188 DIDT_##ENUM_NAME = 1U << DIDT_ID_##ENUM_NAME,
189#include "llvm/BinaryFormat/Dwarf.def"
190#undef HANDLE_DWARF_SECTION
267 virtual std::vector<DILocal>
316 virtual std::unique_ptr<LoadedObjectInfo>
clone()
const = 0;
319template <
typename Derived,
typename Base = LoadedObjectInfo>
326 template <
typename... Ts>
329 std::unique_ptr<llvm::LoadedObjectInfo>
clone()
const override {
330 return std::make_unique<Derived>(
static_cast<const Derived &
>(*
this));
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This file defines the SmallVector class.
virtual std::vector< DILocal > getLocalsForAddress(object::SectionedAddress Address)=0
virtual DIInliningInfo getInliningInfoForAddress(object::SectionedAddress Address, DILineInfoSpecifier Specifier=DILineInfoSpecifier())=0
virtual DILineInfo getLineInfoForDataAddress(object::SectionedAddress Address)=0
virtual DILineInfo getLineInfoForAddress(object::SectionedAddress Address, DILineInfoSpecifier Specifier=DILineInfoSpecifier())=0
virtual DILineInfoTable getLineInfoForAddressRange(object::SectionedAddress Address, uint64_t Size, DILineInfoSpecifier Specifier=DILineInfoSpecifier())=0
virtual bool verify(raw_ostream &OS, DIDumpOptions DumpOpts={})
virtual ~DIContext()=default
virtual void dump(raw_ostream &OS, DIDumpOptions DumpOpts)=0
DIContextKind getKind() const
DIContext(DIContextKind K)
A format-neutral container for inlined code description.
const DILineInfo & getFrame(unsigned Index) const
Returns the frame at Index.
uint32_t getNumberOfFrames() const
void addFrame(const DILineInfo &Frame)
DILineInfo * getMutableFrame(unsigned Index)
Lightweight error class with error context and mandatory checking.
An inferface for inquiring the load address of a loaded object file to be used by the DIContext imple...
virtual std::unique_ptr< LoadedObjectInfo > clone() const =0
Obtain a copy of this LoadedObjectInfo.
LoadedObjectInfo(const LoadedObjectInfo &)=default
virtual bool getLoadedSectionContents(const object::SectionRef &Sec, StringRef &Data) const
If conveniently available, return the content of the given Section.
LoadedObjectInfo()=default
virtual ~LoadedObjectInfo()=default
virtual uint64_t getSectionLoadAddress(const object::SectionRef &Sec) const
Obtain the Load Address of a section by SectionRef.
void push_back(const T &Elt)
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.
static void defaultWarningHandler(Error Warning)
Implement default handling for Warning.
static void defaultErrorHandler(Error Err)
Implement default handling for Error.
This is a value type class that represents a single section in the list of sections in the object fil...
This class implements an extremely fast bulk output stream that can only output to a stream.
This is an optimization pass for GlobalISel generic memory operations.
DINameKind
A DINameKind is passed to name search methods to specify a preference regarding the type of name reso...
DIDumpTypeCounter
This is just a helper to programmatically construct DIDumpType.
DIDumpType
Selects which debug sections get dumped.
Implement std::hash so that hash_code can be used in STL containers.
Container for dump options that control which debug information will be dumped.
std::function< void(Error)> WarningHandler
std::function< void(Error)> RecoverableErrorHandler
static DIDumpOptions getForSingleDIE()
Return default option set for printing a single DIE without children.
std::string JsonErrSummaryFile
std::function< llvm::StringRef(uint64_t DwarfRegNum, bool IsEH)> GetNameForDWARFReg
DIDumpOptions noImplicitRecursion() const
Return the options with RecurseDepth set to 0 unless explicitly required.
unsigned ChildRecurseDepth
unsigned ParentRecurseDepth
Container for description of a global variable.
Controls which fields of DILineInfo container should be filled with data.
DILineInfoSpecifier(FileLineInfoKind FLIKind=FileLineInfoKind::RawValue, FunctionNameKind FNKind=FunctionNameKind::None, bool ApproximateLine=false)
bool operator==(const DILineInfoSpecifier &RHS) const
A format-neutral container for source line information.
static constexpr const char *const BadString
void dump(raw_ostream &OS)
std::optional< uint64_t > StartAddress
bool operator!=(const DILineInfo &RHS) const
static constexpr const char *const Addr2LineBadString
static constexpr const char *const ApproxString
bool operator==(const DILineInfo &RHS) const
std::optional< StringRef > Source
bool operator<(const DILineInfo &RHS) const
std::string StartFileName
std::optional< StringRef > LineSource
std::optional< uint64_t > Size
std::optional< uint64_t > TagOffset
std::optional< int64_t > FrameOffset
LoadedObjectInfoHelper()=default
LoadedObjectInfoHelper(const LoadedObjectInfoHelper &)=default
LoadedObjectInfoHelper(Ts &&...Args)
std::unique_ptr< llvm::LoadedObjectInfo > clone() const override
Obtain a copy of this LoadedObjectInfo.