9#ifndef LLVM_DEBUGINFO_DWARF_DWARFFORMVALUE_H
10#define LLVM_DEBUGINFO_DWARF_DWARFFORMVALUE_H
22class DWARFDataExtractor;
52 const uint8_t *
data =
nullptr;
76 static std::optional<object::SectionedAddress>
122 std::optional<ArrayRef<uint8_t>>
getAsBlock()
const;
136 std::optional<std::string>
178inline std::optional<const char *>
199 auto S = V->getAsCString();
215inline const char *
toString(
const std::optional<DWARFFormValue> &V,
227inline std::optional<uint64_t>
230 return V->getAsUnsignedConstant();
250inline std::optional<uint64_t>
253 return V->getAsReference();
273inline std::optional<int64_t>
toSigned(
const std::optional<DWARFFormValue> &V) {
275 return V->getAsSignedConstant();
285inline int64_t
toSigned(
const std::optional<DWARFFormValue> &V,
295inline std::optional<uint64_t>
298 return V->getAsAddress();
302inline std::optional<object::SectionedAddress>
305 return V->getAsSectionedAddress();
325inline std::optional<uint64_t>
328 return V->getAsSectionOffset();
348inline std::optional<ArrayRef<uint8_t>>
349toBlock(
const std::optional<DWARFFormValue> &V) {
351 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 > toReference(const std::optional< DWARFFormValue > &V)
Take an optional DWARFFormValue and try to extract an reference.
DwarfFormat
Constants that define the DWARF format as 32 or 64 bit.
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 > 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.