llvm::DWARFDie::getHighPC

Get the DW_AT_high_pc attribute value as an address.

Synopsis

Declared in <llvm/DebugInfo/DWARF/DWARFDie.h>

std::optional<uint64_t>
getHighPC(uint64_t LowPC) const;

Description

In DWARF version 4 and later the high PC can be encoded as an offset from the DW_AT_low_pc. This function takes care of extracting the value as an address or offset and adds it to the low PC if needed and returns the value as an optional in case the DIE doesn't have a DW_AT_high_pc attribute.

Return Value

an optional address value for the attribute.

Parameters

NameDescription
LowPCthe low PC that might be needed to calculate the high PC.