Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,11 @@ void DWARFDebugInfoEntry::BuildFunctionAddressRangeTable(
DWARFUnit *cu, DWARFDebugAranges *debug_aranges) const {
Log *log = GetLog(DWARFLog::DebugInfo);
if (m_tag) {
if (m_tag == DW_TAG_subprogram) {
// Subprogram forward declarations don't have
// DW_AT_ranges/DW_AT_low_pc/DW_AT_high_pc attributes, so don't even try
// getting address range information for them.
if (m_tag == DW_TAG_subprogram &&
!GetAttributeValueAsOptionalUnsigned(cu, DW_AT_declaration)) {
if (llvm::Expected<llvm::DWARFAddressRangesVector> ranges =
GetAttributeAddressRanges(cu, /*check_hi_lo_pc=*/true)) {
for (const auto &r : *ranges)
Expand Down
Loading