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

A lightweight wrapper around an expression operand. More...

#include "llvm/IR/DebugInfoMetadata.h"

Public Member Functions

 ExprOperand ()=default
 
 ExprOperand (const uint64_t *Op)
 
const uint64_tget () const
 
uint64_t getOp () const
 Get the operand code.
 
uint64_t getArg (unsigned I) const
 Get an argument to the operand.
 
unsigned getNumArgs () const
 
unsigned getSize () const
 Return the size of the operand.
 
void appendToVector (SmallVectorImpl< uint64_t > &V) const
 Append the elements of this operand to V.
 

Detailed Description

A lightweight wrapper around an expression operand.

TODO: Store arguments directly and change DIExpression to store a range of these.

Definition at line 2770 of file DebugInfoMetadata.h.

Constructor & Destructor Documentation

◆ ExprOperand() [1/2]

llvm::DIExpression::ExprOperand::ExprOperand ( )
default

◆ ExprOperand() [2/2]

llvm::DIExpression::ExprOperand::ExprOperand ( const uint64_t Op)
inlineexplicit

Definition at line 2775 of file DebugInfoMetadata.h.

Member Function Documentation

◆ appendToVector()

void llvm::DIExpression::ExprOperand::appendToVector ( SmallVectorImpl< uint64_t > &  V) const
inline

Append the elements of this operand to V.

Definition at line 2795 of file DebugInfoMetadata.h.

References get(), and getSize().

◆ get()

const uint64_t * llvm::DIExpression::ExprOperand::get ( ) const
inline

Definition at line 2777 of file DebugInfoMetadata.h.

Referenced by appendToVector().

◆ getArg()

uint64_t llvm::DIExpression::ExprOperand::getArg ( unsigned  I) const
inline

Get an argument to the operand.

Never returns the operand itself.

Definition at line 2785 of file DebugInfoMetadata.h.

References I.

◆ getNumArgs()

unsigned llvm::DIExpression::ExprOperand::getNumArgs ( ) const
inline

Definition at line 2787 of file DebugInfoMetadata.h.

References getSize().

◆ getOp()

uint64_t llvm::DIExpression::ExprOperand::getOp ( ) const
inline

Get the operand code.

Definition at line 2780 of file DebugInfoMetadata.h.

Referenced by getSize().

◆ getSize()

unsigned DIExpression::ExprOperand::getSize ( ) const

Return the size of the operand.

Return the number of elements in the operand (1 + args).

Definition at line 1398 of file DebugInfoMetadata.cpp.

References llvm::dwarf::DW_OP_LLVM_arg, llvm::dwarf::DW_OP_LLVM_convert, llvm::dwarf::DW_OP_LLVM_entry_value, llvm::dwarf::DW_OP_LLVM_fragment, llvm::dwarf::DW_OP_LLVM_tag_offset, and getOp().

Referenced by appendToVector(), and getNumArgs().


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