This is splitted from D32228,
currently DWARF parsers code has few places that applied relocations values manually.
These places has similar duplicated code. Patch introduces separate method that can be
used to obtain relocated value. That helps to reduce code and simplifies things.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
LGTM with inline feedback addressed. Thanks!
include/llvm/DebugInfo/DWARF/DWARFContext.h | ||
---|---|---|
54 ↗ | (On Diff #95915) | /// Reads a value from data extractor and applies a relocation to the result if /// one exists for the given offset. |
lib/DebugInfo/DWARF/DWARFContext.cpp | ||
61 ↗ | (On Diff #95915) | LLVM tends to prefer early exits: if (!Relocs) return Data.getUnsigned(Off, Size); ... |