[PATCH] D112679: Make the BBAddrMap struct binary-format-agnostic.

Rahman Lavaee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 27 17:01:17 PDT 2021


rahmanl created this revision.
rahmanl added reviewers: tmsriram, shenhan, jhenderson.
Herald added subscribers: rupprecht, hiraditya.
rahmanl requested review of this revision.
Herald added subscribers: llvm-commits, MaskRay.
Herald added a project: LLVM.

The only binary-format-related field in the BBAddrMap structure is the function address (`Addr`), which will use uint64_t in 64B format and uint32_t in 32B format. This patch changes it to use uint64_t in both formats.
This allows non-templated use of the struct, at the expense of a marginal additional size overhead for the 32-bit format. The size of the BB address map section does not change.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D112679

Files:
  llvm/include/llvm/Object/ELF.h
  llvm/include/llvm/Object/ELFTypes.h
  llvm/lib/Object/ELF.cpp
  llvm/tools/llvm-readobj/ELFDumper.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112679.382859.patch
Type: text/x-patch
Size: 4991 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211028/cf70de7f/attachment.bin>


More information about the llvm-commits mailing list