LLVM 20.0.0git
Static Public Member Functions | Public Attributes | List of all members
llvm::DbgVariableLocation Struct Reference

Represents the location at which a variable is stored. More...

#include "llvm/CodeGen/DebugHandlerBase.h"

Static Public Member Functions

static std::optional< DbgVariableLocationextractFromMachineInstruction (const MachineInstr &Instruction)
 Extract a VariableLocation from a MachineInstr.
 

Public Attributes

unsigned Register
 Base register.
 
SmallVector< int64_t, 1 > LoadChain
 Chain of offsetted loads necessary to load the value if it lives in memory.
 
std::optional< llvm::DIExpression::FragmentInfoFragmentInfo
 Present if the location is part of a larger variable.
 

Detailed Description

Represents the location at which a variable is stored.

Definition at line 31 of file DebugHandlerBase.h.

Member Function Documentation

◆ extractFromMachineInstruction()

std::optional< DbgVariableLocation > DbgVariableLocation::extractFromMachineInstruction ( const MachineInstr Instruction)
static

Extract a VariableLocation from a MachineInstr.

This will only work if Instruction is a debug value instruction and the associated DIExpression is in one of the supported forms. If these requirements are not met, the returned Optional will not have a value.

Definition at line 34 of file DebugHandlerBase.cpp.

References llvm::dwarf::DW_OP_LLVM_arg, llvm::dwarf::DW_OP_LLVM_fragment, llvm::DIExpression::expr_op_begin(), llvm::DIExpression::expr_op_end(), and llvm::Offset.

Member Data Documentation

◆ FragmentInfo

std::optional<llvm::DIExpression::FragmentInfo> llvm::DbgVariableLocation::FragmentInfo

Present if the location is part of a larger variable.

Definition at line 40 of file DebugHandlerBase.h.

◆ LoadChain

SmallVector<int64_t, 1> llvm::DbgVariableLocation::LoadChain

Chain of offsetted loads necessary to load the value if it lives in memory.

Every load except for the last is pointer-sized.

Definition at line 37 of file DebugHandlerBase.h.

Referenced by canUseReferenceType(), and needsReferenceType().

◆ Register

unsigned llvm::DbgVariableLocation::Register

Base register.

Definition at line 33 of file DebugHandlerBase.h.


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