10 #ifndef LLVM_DEBUGINFO_DWARFFORMVALUE_H
11 #define LLVM_DEBUGINFO_DWARFFORMVALUE_H
78 const uint8_t *data =
nullptr;
79 uint64_t SectionIndex;
84 const DWARFUnit *U =
nullptr;
118 return Value.data !=
nullptr &&
Value.data == (
const uint8_t *)
Value.cstr;
186 return V->getAsCString();
197 const char *Default) {
198 return toString(V).getValueOr(Default);
208 return V->getAsUnsignedConstant();
230 return V->getAsReference();
252 return V->getAsSignedConstant();
273 return V->getAsAddress();
294 return V->getAsSectionOffset();
316 return V->getAsBlock();
324 #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.
constexpr T getValueOr(U &&value) const LLVM_LVALUE_FUNCTION
Optional< uint64_t > toAddress(const Optional< DWARFFormValue > &V)
Take an optional DWARFFormValue and try to extract an address.
DwarfFormat
Constants that define the DWARF format as 32 or 64 bit.
size_t size() const
size - Get the array size.
Optional< uint64_t > toSectionOffset(const Optional< DWARFFormValue > &V)
Take an optional DWARFFormValue and try to extract an section offset.
Optional< uint64_t > toReference(const Optional< DWARFFormValue > &V)
Take an optional DWARFFormValue and try to extract an reference.
Optional< const char * > toString(const Optional< DWARFFormValue > &V)
Take an optional DWARFFormValue and try to extract a string value from it.
llvm_unreachable("Unknown RegBank!")
Optional< int64_t > toSigned(const Optional< DWARFFormValue > &V)
Take an optional DWARFFormValue and try to extract an signed constant.
LLVM Value Representation.
This class implements an extremely fast bulk output stream that can only output to a stream...
Optional< uint64_t > toUnsigned(const Optional< DWARFFormValue > &V)
Take an optional DWARFFormValue and try to extract an unsigned constant.