[PATCH] D74197: [DebugInfo] Simplify DWARFDebugAddr.

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 7 11:31:23 PST 2020


dblaikie added inline comments.


================
Comment at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugAddr.h:65
+  /// a header and consists only of a series of addresses.
+  Error extractPreV5(const DWARFDataExtractor &Data, uint64_t *OffsetPtr,
+                     uint16_t CUVersion, uint8_t CUAddrSize);
----------------
aprantl wrote:
> Assuming that DWARF 6 doesn't change the format again, this naming scheme will look odd in the future.
> 
> How about we call this extractV2() and mention in the comment it is for 2 through 4? I.e., always use the minimum version that introduced the encoding in the name?
Agreed - generally the different sections don't rev their versions until their own format changes (eg: debug_line still used v2 even though debug_info was v3 or v4) so I think it makes sense to name them as you're suggesting (with a comment about the valid range - "used up until DWARFv4", "used until at least DWARFv5(current)" or whatever seems good)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74197/new/

https://reviews.llvm.org/D74197





More information about the llvm-commits mailing list