LLVM 19.0.0git
Public Member Functions | List of all members
llvm::DIExpressionCursor Class Reference

Holds a DIExpression and keeps track of how many operands have been consumed so far. More...

#include "llvm/IR/DebugInfoMetadata.h"

Public Member Functions

 DIExpressionCursor (const DIExpression *Expr)
 
 DIExpressionCursor (ArrayRef< uint64_t > Expr)
 
 DIExpressionCursor (const DIExpressionCursor &)=default
 
std::optional< DIExpression::ExprOperandtake ()
 Consume one operation.
 
void consume (unsigned N)
 Consume N operations.
 
std::optional< DIExpression::ExprOperandpeek () const
 Return the current operation.
 
std::optional< DIExpression::ExprOperandpeekNext () const
 Return the next operation.
 
std::optional< DIExpression::ExprOperandpeekNextN (unsigned N) const
 
void assignNewExpr (ArrayRef< uint64_t > Expr)
 
 operator bool () const
 Determine whether there are any operations left in this expression.
 
DIExpression::expr_op_iterator begin () const
 
DIExpression::expr_op_iterator end () const
 
std::optional< DIExpression::FragmentInfogetFragmentInfo () const
 Retrieve the fragment information, if any.
 

Detailed Description

Holds a DIExpression and keeps track of how many operands have been consumed so far.

Definition at line 3160 of file DebugInfoMetadata.h.

Constructor & Destructor Documentation

◆ DIExpressionCursor() [1/3]

llvm::DIExpressionCursor::DIExpressionCursor ( const DIExpression Expr)
inline

◆ DIExpressionCursor() [2/3]

llvm::DIExpressionCursor::DIExpressionCursor ( ArrayRef< uint64_t Expr)
inline

Definition at line 3173 of file DebugInfoMetadata.h.

References End.

◆ DIExpressionCursor() [3/3]

llvm::DIExpressionCursor::DIExpressionCursor ( const DIExpressionCursor )
default

Member Function Documentation

◆ assignNewExpr()

void llvm::DIExpressionCursor::assignNewExpr ( ArrayRef< uint64_t Expr)
inline

Definition at line 3219 of file DebugInfoMetadata.h.

References llvm::ArrayRef< T >::begin(), and llvm::ArrayRef< T >::end().

Referenced by startFromBeginning().

◆ begin()

DIExpression::expr_op_iterator llvm::DIExpressionCursor::begin ( ) const
inline

Definition at line 3227 of file DebugInfoMetadata.h.

◆ consume()

void llvm::DIExpressionCursor::consume ( unsigned  N)
inline

Consume N operations.

Definition at line 3186 of file DebugInfoMetadata.h.

References N.

Referenced by llvm::DwarfExpression::addMachineRegExpression(), and consumeOneOperator().

◆ end()

DIExpression::expr_op_iterator llvm::DIExpressionCursor::end ( ) const
inline

Definition at line 3228 of file DebugInfoMetadata.h.

References End.

◆ getFragmentInfo()

std::optional< DIExpression::FragmentInfo > llvm::DIExpressionCursor::getFragmentInfo ( ) const
inline

Retrieve the fragment information, if any.

Definition at line 3231 of file DebugInfoMetadata.h.

References End, and llvm::DIExpression::getFragmentInfo().

Referenced by llvm::DwarfExpression::addMachineRegExpression().

◆ operator bool()

llvm::DIExpressionCursor::operator bool ( ) const
inline

Determine whether there are any operations left in this expression.

Definition at line 3225 of file DebugInfoMetadata.h.

References End.

◆ peek()

std::optional< DIExpression::ExprOperand > llvm::DIExpressionCursor::peek ( ) const
inline

◆ peekNext()

std::optional< DIExpression::ExprOperand > llvm::DIExpressionCursor::peekNext ( ) const
inline

Return the next operation.

Definition at line 3196 of file DebugInfoMetadata.h.

References End.

Referenced by llvm::DwarfExpression::addMachineRegExpression(), llvm::DIExpression::foldConstantMath(), and optimizeDwarfOperations().

◆ peekNextN()

std::optional< DIExpression::ExprOperand > llvm::DIExpressionCursor::peekNextN ( unsigned  N) const
inline

◆ take()

std::optional< DIExpression::ExprOperand > llvm::DIExpressionCursor::take ( )
inline

The documentation for this class was generated from the following file: