15 #ifndef LLVM_DEBUGINFO_DICONTEXT_H 16 #define LLVM_DEBUGINFO_DICONTEXT_H 42 DILineInfo() : FileName(
"<invalid>"), FunctionName(
"<invalid>") {}
45 return Line == RHS.
Line && Column == RHS.
Column &&
51 return !(*
this == RHS);
55 return std::tie(FileName, FunctionName, Line, Column, StartLine,
65 if (FileName !=
"<invalid>")
66 OS <<
"file '" << FileName <<
"', ";
67 if (FunctionName !=
"<invalid>")
68 OS <<
"function '" << FunctionName <<
"', ";
69 OS <<
"line " << Line <<
", ";
70 OS <<
"column " << Column <<
", ";
71 OS <<
"start line " << StartLine <<
'\n';
91 return &Frames[
Index];
127 : FLIKind(FLIKind), FNKind(FNKind) {}
132 #define HANDLE_DWARF_SECTION(ENUM_NAME, ELF_NAME, CMDLINE_NAME) \ 134 #include "llvm/BinaryFormat/Dwarf.def" 135 #undef HANDLE_DWARF_SECTION 139 static_assert(
DIDT_ID_Count <= 32,
"section types overflow storage");
145 #define HANDLE_DWARF_SECTION(ENUM_NAME, ELF_NAME, CMDLINE_NAME) \ 146 DIDT_##ENUM_NAME = 1U << DIDT_ID_##ENUM_NAME, 147 #include "llvm/BinaryFormat/Dwarf.def" 148 #undef HANDLE_DWARF_SECTION 156 unsigned RecurseDepth = -1U;
158 uint8_t AddrSize = 4;
159 bool ShowAddresses =
true;
160 bool ShowChildren =
false;
161 bool ShowParents =
false;
162 bool ShowForm =
false;
163 bool SummarizeTypes =
false;
164 bool Verbose =
false;
165 bool DisplayRawContents =
false;
177 if (RecurseDepth == -1U && !ShowChildren)
206 virtual DIInliningInfo getInliningInfoForAddress(uint64_t Address,
255 virtual std::unique_ptr<LoadedObjectInfo> clone()
const = 0;
258 template <
typename Derived,
typename Base = LoadedObjectInfo>
265 template <
typename... Ts>
268 std::unique_ptr<llvm::LoadedObjectInfo>
clone()
const override {
269 return llvm::make_unique<Derived>(
static_cast<const Derived &
>(*this));
275 #endif // LLVM_DEBUGINFO_DICONTEXT_H
void push_back(const T &Elt)
Optional< StringRef > Source
bool operator!=(const DILineInfo &RHS) const
DILineInfo * getMutableFrame(unsigned Index)
Compute iterated dominance frontiers using a linear time algorithm.
virtual bool getLoadedSectionContents(const object::SectionRef &Sec, StringRef &Data) const
If conveniently available, return the content of the given Section.
void addFrame(const DILineInfo &Frame)
DINameKind
A DINameKind is passed to name search methods to specify a preference regarding the type of name reso...
A format-neutral container for source line information.
bool operator<(const DILineInfo &RHS) const
virtual uint64_t getSectionLoadAddress(const object::SectionRef &Sec) const
Obtain the Load Address of a section by SectionRef.
DIContextKind getKind() const
virtual bool verify(raw_ostream &OS, DIDumpOptions DumpOpts={})
uint32_t getNumberOfFrames() const
Container for dump options that control which debug information will be dumped.
Controls which fields of DILineInfo container should be filled with data.
DIDumpOptions noImplicitRecursion() const
Return the options with RecurseDepth set to 0 unless explicitly required.
bool operator==(const DILineInfo &RHS) const
DIContext(DIContextKind K)
A format-neutral container for inlined code description.
LoadedObjectInfoHelper(Ts &&... Args)
void dump(raw_ostream &OS)
DILineInfoSpecifier(FileLineInfoKind FLIKind=FileLineInfoKind::Default, FunctionNameKind FNKind=FunctionNameKind::None)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
DIDumpType
Selects which debug sections get dumped.
An inferface for inquiring the load address of a loaded object file to be used by the DIContext imple...
std::unique_ptr< llvm::LoadedObjectInfo > clone() const override
DIDumpTypeCounter
This is just a helper to programmatically construct DIDumpType.
static DIDumpOptions getForSingleDIE()
Return default option set for printing a single DIE without children.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
constexpr char Size[]
Key for Kernel::Arg::Metadata::mSize.
This class implements an extremely fast bulk output stream that can only output to a stream...
StringRef - Represent a constant reference to a string, i.e.
constexpr char Args[]
Key for Kernel::Metadata::mArgs.
Container for description of a global variable.
This is a value type class that represents a single section in the list of sections in the object fil...
DILineInfo getFrame(unsigned Index) const