1//===- DWARFDataExtractor.h -------------------------------------*- C++ -*-===//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7//===----------------------------------------------------------------------===//
9#ifndef LLVM_DEBUGINFO_DWARF_DWARFDATAEXTRACTOR_H
10#define LLVM_DEBUGINFO_DWARF_DWARFDATAEXTRACTOR_H
21/// A DWARFDataExtractor (typically for an in-memory copy of an object-file
22/// section) plus a relocation map for that section, if there is one.
30 /// Constructor for the normal case of extracting data from a DWARF section.
31 /// The DWARFSection's lifetime must be at least as long as the extractor's.
33 bool IsLittleEndian,
uint8_t AddressSize)
35 Obj(&Obj), Section(&Section) {}
37 /// Truncating constructor
43 /// Extracts a value and applies a relocation to the result if
44 /// one exists for the given offset.
52 std::optional<RelocAddrEntry>
E = Obj->find(*Section, *Off);
54 if (!
E || (Err && *Err))
57 *SecNdx =
E->SectionIndex;
60 E->SymbolValue, LocData);
68}
// end namespace llvm
70#endif // LLVM_DEBUGINFO_DWARF_DWARFDATAEXTRACTOR_H
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
This file contains constants used for implementing Dwarf debug support.
static StringRef substr(StringRef Str, uint64_t Len)
Helper for Errors used as out-parameters.
Lightweight error class with error context and mandatory checking.
LLVM_ABI uint64_t resolveRelocation(RelocationResolver Resolver, const RelocationRef &R, uint64_t S, uint64_t LocData)
This is an optimization pass for GlobalISel generic memory operations.
FunctionAddr VTableAddr uintptr_t uintptr_t Data
static const uint64_t UndefSection