9#ifndef LLVM_DEBUGINFO_DWARF_LOWLEVEL_DWARFDATAEXTRACTORSIMPLE_H
10#define LLVM_DEBUGINFO_DWARF_LOWLEVEL_DWARFDATAEXTRACTORSIMPLE_H
23template <
typename Relocator>
30 :
DataExtractor(Data, IsLittleEndian), AddressSize(AddressSize) {}
37 AddressSize(AddressSize) {}
90 Error *Err =
nullptr)
const {
91 return static_cast<const Relocator *
>(
this)->getRelocatedValueImpl(
92 Size, Off, SectionIndex, Err);
96 uint64_t *SectionIndex =
nullptr)
const {
115 std::pair<uint64_t, dwarf::DwarfFormat>
131 std::errc::invalid_argument,
132 "unsupported reserved unit length of value 0x%8.8" PRIx64,
Length);
141 *Err =
C.takeError();
163 switch (Encoding & 0x0F) {
203 switch (Encoding & 0x70) {
208 Result += PCRelOffset;
233 Error *Err =
nullptr)
const {
234 assert(SectionIndex ==
nullptr &&
235 "DWARFDATAExtractorSimple cannot take section indices.");
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
This file contains constants used for implementing Dwarf debug support.
static StringRef substr(StringRef Str, uint64_t Len)
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Helper for Errors used as out-parameters.
Lightweight error class with error context and mandatory checking.
StringRef - Represent a constant reference to a string, i.e.
@ C
The default llvm calling convention, compatible with C.
DwarfFormat
Constants that define the DWARF format as 32 or 64 bit.
@ DW_LENGTH_lo_reserved
Special values for an initial length field.
@ DW_LENGTH_DWARF64
Indicator of 64-bit DWARF format.
This is an optimization pass for GlobalISel generic memory operations.
Error createStringError(std::error_code EC, char const *Fmt, const Ts &... Vals)
Create formatted StringError object.
void cantFail(Error Err, const char *Msg=nullptr)
Report a fatal error if Err is a failure value.
constexpr int64_t SignExtend64(uint64_t x)
Sign-extend the number in the bottom B bits of X to a 64-bit integer.
void consumeError(Error Err)
Consume a Error without doing anything.