9#ifndef LLVM_DEBUGINFO_DWARF_DWARFFORMVALUE_H
10#define LLVM_DEBUGINFO_DWARF_DWARFFORMVALUE_H
22class DWARFDataExtractor;
76 static std::optional<object::SectionedAddress>
120 std::optional<ArrayRef<uint8_t>>
getAsBlock()
const;
134 std::optional<std::string>
176inline std::optional<const char *>
197 auto S = V->getAsCString();
213inline const char *
toString(
const std::optional<DWARFFormValue> &V,
225inline std::optional<uint64_t>
228 return V->getAsUnsignedConstant();
249inline std::optional<uint64_t>
252 return V->getAsRelativeReference();
273inline std::optional<uint64_t>
276 return V->getAsDebugInfoReference();
298inline std::optional<uint64_t>
301 return V->getAsSignatureReference();
322inline std::optional<uint64_t>
325 return V->getAsSupplementaryReference();
346inline std::optional<int64_t>
toSigned(
const std::optional<DWARFFormValue> &V) {
348 return V->getAsSignedConstant();
358inline int64_t
toSigned(
const std::optional<DWARFFormValue> &V,
368inline std::optional<uint64_t>
371 return V->getAsAddress();
375inline std::optional<object::SectionedAddress>
378 return V->getAsSectionedAddress();
398inline std::optional<uint64_t>
401 return V->getAsSectionOffset();
421inline std::optional<ArrayRef<uint8_t>>
422toBlock(
const std::optional<DWARFFormValue> &V) {
424 return V->getAsBlock();
static GCRegistry::Add< StatepointGC > D("statepoint-example", "an example strategy for statepoint")
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
This file contains constants used for implementing Dwarf debug support.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
DWARFContext This data structure is the top level entity that deals with dwarf debug information pars...
Tagged union holding either a T or a Error.
StringRef - Represent a constant reference to a string, i.e.
LLVM Value Representation.
This class implements an extremely fast bulk output stream that can only output to a stream.
std::optional< uint64_t > toAddress(const std::optional< DWARFFormValue > &V)
Take an optional DWARFFormValue and try to extract an address.
std::optional< const char * > toString(const std::optional< DWARFFormValue > &V)
Take an optional DWARFFormValue and try to extract a string value from it.
std::optional< object::SectionedAddress > toSectionedAddress(const std::optional< DWARFFormValue > &V)
std::optional< int64_t > toSigned(const std::optional< DWARFFormValue > &V)
Take an optional DWARFFormValue and try to extract an signed constant.
std::optional< uint64_t > toSignatureReference(const std::optional< DWARFFormValue > &V)
Take an optional DWARFFormValue and try to extract a signature reference.
DwarfFormat
Constants that define the DWARF format as 32 or 64 bit.
std::optional< uint64_t > toDebugInfoReference(const std::optional< DWARFFormValue > &V)
Take an optional DWARFFormValue and try to extract an absolute debug info offset reference.
bool doesFormBelongToClass(dwarf::Form Form, DWARFFormValue::FormClass FC, uint16_t DwarfVersion)
Check whether specified Form belongs to the FC class.
std::optional< uint64_t > toSectionOffset(const std::optional< DWARFFormValue > &V)
Take an optional DWARFFormValue and try to extract an section offset.
StringRef toStringRef(const std::optional< DWARFFormValue > &V, StringRef Default={})
Take an optional DWARFFormValue and try to extract a string value from it.
std::optional< ArrayRef< uint8_t > > toBlock(const std::optional< DWARFFormValue > &V)
Take an optional DWARFFormValue and try to extract block data.
std::optional< uint64_t > toRelativeReference(const std::optional< DWARFFormValue > &V)
Take an optional DWARFFormValue and try to extract a relative offset reference.
std::optional< uint64_t > toSupplementaryReference(const std::optional< DWARFFormValue > &V)
Take an optional DWARFFormValue and try to extract a supplementary debug info reference.
std::optional< uint64_t > toUnsigned(const std::optional< DWARFFormValue > &V)
Take an optional DWARFFormValue and try to extract an unsigned constant.
This is an optimization pass for GlobalISel generic memory operations.
@ Default
The result values are uniform if and only if all operands are uniform.
void consumeError(Error Err)
Consume a Error without doing anything.
Container for dump options that control which debug information will be dumped.