aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/Host.cpp
diff options
context:
space:
mode:
authorPavel Labath <pavel@labath.sk>2019-05-06 07:45:28 +0000
committerPavel Labath <pavel@labath.sk>2019-05-06 07:45:28 +0000
commit2a0cfcce6a272f64432d6eb18fa922e6f4631f77 (patch)
tree818017feb4b6e44c490a7b932e58661c138f5d87 /llvm/lib/Support/Host.cpp
parenta778074165ca9554c9556b9bbeee6ca4e2babe96 (diff)
downloadllvm-2a0cfcce6a272f64432d6eb18fa922e6f4631f77.zip
llvm-2a0cfcce6a272f64432d6eb18fa922e6f4631f77.tar.gz
llvm-2a0cfcce6a272f64432d6eb18fa922e6f4631f77.tar.bz2
[DWARF] Reimplement/simplify DWARFUnit::GetID
Summary: The implementation of GetID used a relatively complicated algorithm, which returned some kind of an offset of the unit in some file (depending on the debug info flavour). The only thing this ID was used for was to enable subseqent retrieval of the unit from the SymbolFile. This can be made simpler if we just make the "ID" of the unit an index into the list of the units belonging to the symbol file. We already support indexed access to the units, so each unit already has a well "index" -- this just makes it accessible from within the unit. To make the distincion between "id" and "offset" clearer (and help catch any misuses), I also rename DWARFDebugInfo::GetCompileUnit (which accesses by offset) into DWARFDebugInfo::GetCompileUnitAtOffset. On its own, this only brings a minor simplification, but it enables further simplifications in the DIERef class (coming in a follow-up patch). Reviewers: JDevlieghere, clayborg, aprantl Subscribers: arphaman, jdoerfert, lldb-commits, tberghammer, jankratochvil Differential Revision: https://reviews.llvm.org/D61481 llvm-svn: 360014
Diffstat (limited to 'llvm/lib/Support/Host.cpp')
0 files changed, 0 insertions, 0 deletions