DebugInfo: Accurately propagate the section used by a relocation when accessing range...
authorDavid Blaikie <dblaikie@gmail.com>
Sat, 22 Dec 2018 22:20:40 +0000 (22:20 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Sat, 22 Dec 2018 22:20:40 +0000 (22:20 +0000)
commit2a38c17b34b3893c1557446f19097b045110301f
treec70d91962ce72ae9c7bffaae9d27b34794574aa6
parent25179613f67ddf037ab378a3966187d1d986fa92
DebugInfo: Accurately propagate the section used by a relocation when accessing ranges defined by low/high_pc

This is difficult/not possible to test in LLVM, but is visible as a
crash in LLD when parsing DWARF to generate gdb-index.

This function is called by llvm-dwarfdump when parsing high_pc for
non-verbose output (to print the actual high_pc rather than the low_pc
relative value), but in that case llvm-dwarfdump doesn't print section
names (if it did, it would hit this problem).

We could add some other features to llvm-dwarfdump to expose this, but
nothing really springs to my mind. I will add a test to lld, though.

llvm-svn: 350010
llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h
llvm/lib/DebugInfo/DWARF/DWARFDie.cpp