llvm-dwarfdump --verify: Don't diagnose functions in different sections as overlapping
authorDavid Blaikie <dblaikie@gmail.com>
Fri, 29 Oct 2021 00:09:03 +0000 (17:09 -0700)
committerDavid Blaikie <dblaikie@gmail.com>
Fri, 29 Oct 2021 00:13:57 +0000 (17:13 -0700)
commitb65f24a74c64ae3b727c3d9e76594ddbbd403790
tree3b0391f659905f3d377608e9ad3a0d5fc4f50e43
parentdc8e5e1dc03dc49ecde6a19f06e33b3631141b6a
llvm-dwarfdump --verify: Don't diagnose functions in different sections as overlapping

Functions in different sections (common in object files - inline
functions, -ffunction-sections, etc) can't overlap, so factor in the
section when diagnosing overlapping address ranges.

This removes a major false-positive when running llvm-dwarfdump on
unlinked code.
llvm/include/llvm/DebugInfo/DWARF/DWARFAddressRange.h
llvm/test/DebugInfo/X86/template.ll
llvm/test/tools/llvm-dwarfdump/X86/verify_overlapping_function_ranges_distinct_sections.s [new file with mode: 0644]