9 #ifndef LLVM_DEBUGINFO_DWARFFORMVALUE_H 10 #define LLVM_DEBUGINFO_DWARFFORMVALUE_H 53 const uint8_t *data =
nullptr;
54 uint64_t SectionIndex;
97 return extractValue(Data, OffsetPtr, FormParams,
nullptr, U);
101 return Value.data !=
nullptr && Value.data == (
const uint8_t *)Value.cstr;
163 return V->getAsCString();
175 if (
auto S = V->getAsCString())
188 return toString(V).getValueOr(Default);
198 return V->getAsUnsignedConstant();
220 return V->getAsReference();
242 return V->getAsSignedConstant();
253 return toSigned(V).getValueOr(Default);
263 return V->getAsAddress();
270 return V->getAsSectionedAddress();
291 return V->getAsSectionOffset();
313 return V->getAsBlock();
321 #endif // LLVM_DEBUGINFO_DWARFFORMVALUE_H
PointerUnion< const Value *, const PseudoSourceValue * > ValueType
Optional< ArrayRef< uint8_t > > toBlock(const Optional< DWARFFormValue > &V)
Take an optional DWARFFormValue and try to extract block data.
This class represents lattice values for constants.
uint64_t toUnsigned(const Optional< DWARFFormValue > &V, uint64_t Default)
Take an optional DWARFFormValue and extract a unsigned constant.
std::string toString(Error E)
Write all error messages (if any) in E to a string.
Optional< object::SectionedAddress > toSectionedAddress(const Optional< DWARFFormValue > &V)
Container for dump options that control which debug information will be dumped.
uint64_t toSectionOffset(const Optional< DWARFFormValue > &V, uint64_t Default)
Take an optional DWARFFormValue and extract a section offset.
int64_t toSigned(const Optional< DWARFFormValue > &V, int64_t Default)
Take an optional DWARFFormValue and extract a signed integer.
StringRef toStringRef(bool B)
Construct a string ref from a boolean.
uint64_t toReference(const Optional< DWARFFormValue > &V, uint64_t Default)
Take an optional DWARFFormValue and extract a reference.
DWARFContext This data structure is the top level entity that deals with dwarf debug information pars...
static GCRegistry::Add< StatepointGC > D("statepoint-example", "an example strategy for statepoint")
This file contains constants used for implementing Dwarf debug support.
uint64_t toAddress(const Optional< DWARFFormValue > &V, uint64_t Default)
Take an optional DWARFFormValue and extract a address.
LLVM Value Representation.
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.