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];
132 : FLIKind(FLIKind), FNKind(FNKind) {}
137 #define HANDLE_DWARF_SECTION(ENUM_NAME, ELF_NAME, CMDLINE_NAME) \ 139 #include "llvm/BinaryFormat/Dwarf.def" 140 #undef HANDLE_DWARF_SECTION 144 static_assert(
DIDT_ID_Count <= 32,
"section types overflow storage");
150 #define HANDLE_DWARF_SECTION(ENUM_NAME, ELF_NAME, CMDLINE_NAME) \ 151 DIDT_##ENUM_NAME = 1U << DIDT_ID_##ENUM_NAME, 152 #include "llvm/BinaryFormat/Dwarf.def" 153 #undef HANDLE_DWARF_SECTION 161 unsigned RecurseDepth = -1U;
163 uint8_t AddrSize = 4;
164 bool ShowAddresses =
true;
165 bool ShowChildren =
false;
166 bool ShowParents =
false;
167 bool ShowForm =
false;
168 bool SummarizeTypes =
false;
169 bool Verbose =
false;
170 bool DisplayRawContents =
false;
182 if (RecurseDepth == -1U && !ShowChildren)
211 virtual DIInliningInfo getInliningInfoForAddress(uint64_t Address,
260 virtual std::unique_ptr<LoadedObjectInfo> clone()
const = 0;
263 template <
typename Derived,
typename Base = LoadedObjectInfo>
270 template <
typename... Ts>
273 std::unique_ptr<llvm::LoadedObjectInfo>
clone()
const override {
274 return llvm::make_unique<Derived>(
static_cast<const Derived &
>(*this));
280 #endif // LLVM_DEBUGINFO_DICONTEXT_H
Optional< StringRef > Source
bool operator!=(const DILineInfo &RHS) const
DILineInfo * getMutableFrame(unsigned Index)
This class represents lattice values for constants.
virtual bool getLoadedSectionContents(const object::SectionRef &Sec, StringRef &Data) const
If conveniently available, return the content of the given Section.
void push_back(const T &Elt)
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())
const DILineInfo & getFrame(unsigned Index) const
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...