9#ifndef LLVM_DEBUGINFO_DWARF_LOWLEVEL_DWARFEXPRESSION_H
10#define LLVM_DEBUGINFO_DWARF_LOWLEVEL_DWARFEXPRESSION_H
71 template <
typename... Ts>
97 return OperandEndOffsets;
100 return OperandEndOffsets[Idx];
108 std::optional<dwarf::DwarfFormat> Format);
120 : Expr(Expr), Offset(Offset) {
122 Offset >= Expr->Data.getData().
size() ||
123 !Op.extract(Expr->Data, Expr->AddressSize, Offset, Expr->Format);
128 Offset = Op.isError() ? Expr->Data.getData().size() : Op.EndOffset;
130 Offset >= Expr->Data.getData().size() ||
131 !Op.extract(Expr->Data, Expr->AddressSize, Offset, Expr->Format);
138 return iterator(Expr, Op.EndOffset +
Add);
146 std::optional<dwarf::DwarfFormat> Format = std::nullopt)
147 : Data(Data), AddressSize(AddressSize), Format(Format) {
148 assert(AddressSize == 8 || AddressSize == 4 || AddressSize == 2);
163 std::optional<dwarf::DwarfFormat> Format;
168 return LHS.Expr ==
RHS.Expr &&
LHS.Offset ==
RHS.Offset;
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
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),...
This class represents an Operation in the Expression.
LLVM_ABI std::optional< unsigned > getSubCode() const
@ DwarfNA
Serves as a marker for unused entries.
uint64_t getNumOperands() const
uint64_t getEndOffset() const
ArrayRef< uint64_t > getRawOperands() const
Encoding
Size and signedness of expression operations' operands.
@ SizeSubOpLEB
The operand is a ULEB128 encoded SubOpcode.
@ SizeBlock
Preceding operand contains block size.
const Description & getDescription() const
ArrayRef< uint64_t > getOperandEndOffsets() const
uint64_t getOperandEndOffset(unsigned Idx) const
uint64_t getRawOperand(unsigned Idx) const
friend class DWARFVerifier
An iterator to go through the expression operations.
friend bool operator==(const iterator &, const iterator &)
friend class DWARFExpression
const Operation & operator*() const
iterator skipBytes(uint64_t Add) const
StringRef getData() const
DWARFExpression(DataExtractor Data, uint8_t AddressSize, std::optional< dwarf::DwarfFormat > Format=std::nullopt)
LLVM_ABI bool operator==(const DWARFExpression &RHS) const
friend class DWARFVerifier
MCRegisterInfo base class - We assume that the target defines a static array of MCRegisterDesc object...
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StringRef - Represent a constant reference to a string, i.e.
CRTP base class which implements the entire standard iterator facade in terms of a minimal subset of ...
This class implements an extremely fast bulk output stream that can only output to a stream.
This is an optimization pass for GlobalISel generic memory operations.
auto size(R &&Range, std::enable_if_t< std::is_base_of< std::random_access_iterator_tag, typename std::iterator_traits< decltype(Range.begin())>::iterator_category >::value, void > *=nullptr)
Get the size of a range.
bool operator==(const AddressRangeValuePair &LHS, const AddressRangeValuePair &RHS)
Container for dump options that control which debug information will be dumped.
Description of the encoding of one expression Op.
Description(DwarfVersion Version, Ts... Op)
DwarfVersion Version
Dwarf version where the Op was introduced.
SmallVector< Encoding > Op
Encoding for Op operands.