llvm::salvageDebugInfoImpl

Given an instruction I and DIExpression DIExpr operating on it, append the effects of I to the DIExpression operand list Ops, or return nullptr if it cannot be salvaged. CurrentLocOps is the number of SSA values referenced by the incoming Ops.

Synopsis

Declared in <llvm/Transforms/Utils/Local.h>

Value*
salvageDebugInfoImpl(
    Instruction& I,
    uint64_t CurrentLocOps,
    SmallVectorImpl<uint64_t>& Ops,
    SmallVectorImpl<Value*>& AdditionalValues);

Description

/ I = add %a, i32 1

Return = %a Ops = llvm::dwarf::DW_OP_lit1 llvm::dwarf::DW_OP_add

I = add %a, %b

Return = %a Ops = llvm::dwarf::DW_OP_LLVM_arg0 llvm::dwarf::DW_OP_add AdditionalValues = %b

Return Value

the first non-constant operand implicitly referred to by Ops. If I references more than one non-constant operand, any additional operands are added to AdditionalValues.

Parameters

NameDescription
OpsThis class consists of common code factored out of the SmallVector class to reduce code duplication based on the SmallVector 'N' template parameter.
AdditionalValuesThis class consists of common code factored out of the SmallVector class to reduce code duplication based on the SmallVector 'N' template parameter.