Make the BBAddrMap struct binary-format-agnostic.
authorRahman Lavaee <rahmanl@google.com>
Thu, 28 Oct 2021 00:00:27 +0000 (17:00 -0700)
committerRahman Lavaee <rahmanl@google.com>
Thu, 4 Nov 2021 17:27:24 +0000 (10:27 -0700)
commitf533ec37eb23e709009dc0f753771b2144819c73
tree577f68241a6799b916d47d75a799f832dc32159a
parent0649dfebbab76424e9501a97a21a6253be1d6dcc
Make the BBAddrMap struct binary-format-agnostic.

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.

Differential Revision: https://reviews.llvm.org/D112679
llvm/include/llvm/Object/ELF.h
llvm/include/llvm/Object/ELFTypes.h
llvm/lib/Object/ELF.cpp
llvm/tools/llvm-readobj/ELFDumper.cpp