[all-commits] [llvm/llvm-project] b6ff43: [Support] Remove address-extraction methods from D...

Sergei Barannikov via All-commits all-commits at lists.llvm.org
Mon Apr 13 06:45:13 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b6ff43f1ecd34717b8d22dac329ca913fc910d4f
      https://github.com/llvm/llvm-project/commit/b6ff43f1ecd34717b8d22dac329ca913fc910d4f
  Author: Sergei Barannikov <barannikov88 at gmail.com>
  Date:   2026-04-13 (Mon, 13 Apr 2026)

  Changed paths:
    M bolt/lib/Core/AddressMap.cpp
    M bolt/lib/Rewrite/GNUPropertyRewriter.cpp
    M bolt/lib/Target/AArch64/AArch64MCPlusBuilder.cpp
    M lldb/source/DataFormatters/FormatterSection.cpp
    M llvm/include/llvm/DebugInfo/DWARF/LowLevel/DWARFDataExtractorSimple.h
    M llvm/include/llvm/Object/BBAddrMap.h
    M llvm/include/llvm/Support/DataExtractor.h
    M llvm/lib/DebugInfo/GSYM/FunctionInfo.cpp
    M llvm/lib/DebugInfo/GSYM/MergedFunctionsInfo.cpp
    M llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp
    M llvm/lib/Object/ELF.cpp
    M llvm/tools/llvm-readobj/ELFDumper.cpp
    M llvm/tools/obj2yaml/dwarf2yaml.cpp
    M llvm/tools/obj2yaml/elf2yaml.cpp
    M llvm/unittests/Support/DataExtractorTest.cpp

  Log Message:
  -----------
  [Support] Remove address-extraction methods from DataExtractor (NFC) (#190519)

Most clients don't have a notion of "address" and pass arbitrary values
(including `0` and `sizeof(void *)`) to `DataExtractor` constructors.
This makes address-extraction methods dangerous to use.

Those clients that do have a notion of address can use other methods
like `getUnsigned()` to extract an address, or they can derive from
`DataExtractor` and add convenience methods if extracting an address is
routine. `DWARFDataExtractor` is an example, where the removed methods
were actually moved.

This does not remove `AddressSize` argument of `DataExtractor`
constructors yet, but makes it unused and overloads constructors in
preparation for their deletion. I'll be removing uses of the
to-be-deleted constructors in follow-up patches.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list