9#ifndef LLVM_DEBUGINFO_DWARF_DWARFEXPRESSION_H
10#define LLVM_DEBUGINFO_DWARF_DWARFEXPRESSION_H
70 template <
typename... Ts>
88 uint8_t
getCode()
const {
return Opcode; }
94 return OperandEndOffsets;
97 return OperandEndOffsets[
Idx];
109 std::optional<dwarf::DwarfFormat> Format);
124 !
Op.extract(Expr->Data, Expr->AddressSize,
Offset, Expr->Format);
132 !
Op.extract(Expr->Data, Expr->AddressSize,
Offset, Expr->Format);
147 std::optional<dwarf::DwarfFormat> Format = std::nullopt)
148 : Data(Data), AddressSize(AddressSize), Format(Format) {
149 assert(AddressSize == 8 || AddressSize == 4 || AddressSize == 2);
156 bool IsEH =
false)
const;
164 GetNameForDWARFReg =
nullptr);
179 std::optional<dwarf::DwarfFormat> Format;
184 return LHS.Expr ==
RHS.Expr &&
LHS.Offset ==
RHS.Offset;
Returns the sub type a function will return at a given Idx Should correspond to the result type of an ExtractValue instruction executed with just that one unsigned Idx
This file contains constants used for implementing Dwarf debug support.
mir Rename Register Operands
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
This class represents an Operation in the Expression.
std::optional< unsigned > getSubCode() const
@ DwarfNA
Serves as a marker for unused entries.
uint64_t getNumOperands() const
bool print(raw_ostream &OS, DIDumpOptions DumpOpts, const DWARFExpression *Expr, DWARFUnit *U) 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
An iterator to go through the expression operations.
const Operation & operator*() const
friend bool operator==(const iterator &, const iterator &)
iterator skipBytes(uint64_t Add) const
StringRef getData() const
DWARFExpression(DataExtractor Data, uint8_t AddressSize, std::optional< dwarf::DwarfFormat > Format=std::nullopt)
bool printCompact(raw_ostream &OS, std::function< StringRef(uint64_t RegNum, bool IsEH)> GetNameForDWARFReg=nullptr)
Print the expression in a format intended to be compact and useful to a user, but not perfectly unamb...
void print(raw_ostream &OS, DIDumpOptions DumpOpts, DWARFUnit *U, bool IsEH=false) const
static bool prettyPrintRegisterOp(DWARFUnit *U, raw_ostream &OS, DIDumpOptions DumpOpts, uint8_t Opcode, const ArrayRef< uint64_t > Operands)
Lightweight error class with error context and mandatory checking.
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.
constexpr size_t size() const
size - Get the string size.
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.
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.