[PATCH] D58952: [llvm] Skip over empty line table entries.
Paul Robinson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 6 13:59:14 PST 2019
probinson added inline comments.
================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp:871
+ // In some cases, e.g. first instruction in a function, the compiler generates
+ // two entries, both with the same address. We want the last one.
LineTable::RowIter RowPos = std::lower_bound(
----------------
aprantl wrote:
> Doesn't the DWARF spec require all PC values in the line table to be strictly monotonically increasing? How is it possible to have more than one entry at the same address?
The DWARF spec's model is based on increasing PC values, however the encoding allows advancing PC by 0. So it's entirely possible to have a line table that (for example) advances line by 2 and PC by 0.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58952/new/
https://reviews.llvm.org/D58952
More information about the llvm-commits
mailing list