9#ifndef LLVM_DEBUGINFO_DWARF_DWARFFORMVALUE_H
10#define LLVM_DEBUGINFO_DWARF_DWARFFORMVALUE_H
23class DWARFDataExtractor;
77 LLVM_ABI static std::optional<object::SectionedAddress>
122 LLVM_ABI std::optional<object::SectionedAddress>
181inline std::optional<const char *>
202 auto S = V->getAsCString();
218inline const char *
toString(
const std::optional<DWARFFormValue> &V,
230inline std::optional<uint64_t>
233 return V->getAsUnsignedConstant();
254inline std::optional<uint64_t>
257 return V->getAsRelativeReference();
278inline std::optional<uint64_t>
281 return V->getAsDebugInfoReference();
303inline std::optional<uint64_t>
306 return V->getAsSignatureReference();
327inline std::optional<uint64_t>
330 return V->getAsSupplementaryReference();
351inline std::optional<int64_t>
toSigned(
const std::optional<DWARFFormValue> &V) {
353 return V->getAsSignedConstant();
363inline int64_t
toSigned(
const std::optional<DWARFFormValue> &V,
373inline std::optional<uint64_t>
376 return V->getAsAddress();
380inline std::optional<object::SectionedAddress>
383 return V->getAsSectionedAddress();
403inline std::optional<uint64_t>
406 return V->getAsSectionOffset();
426inline std::optional<ArrayRef<uint8_t>>
427toBlock(
const std::optional<DWARFFormValue> &V) {
429 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.
LLVM_ABI 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.