[PATCH] D124560: [llvm-objdump] Symbolize branch targets and basic block addresses based on the bb-address-map when present in the object file.
Rahman Lavaee via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 6 10:53:07 PDT 2022
rahmanl added inline comments.
================
Comment at: llvm/include/llvm/Object/ELFTypes.h:816
+
+ bool operator==(const BBEntry &Other) const {
+ return Offset == Other.Offset && Size == Other.Size &&
----------------
jhenderson wrote:
> Did you consider using `std::memcmp` here instead of checking each individual field separately. The problem with the current code is that if you add a new field, it'll be easy to forget to add it in the comparison. On the other hand, `std::memcmp` would prevent adding non-POD fields, like `std::vector` etc, so may not be appropriate. Up to you.
Thanks for the suggestion. I would go for field-by-field comparison. I don't expect the operator to be used for anything other than unit-tests.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124560/new/
https://reviews.llvm.org/D124560
More information about the llvm-commits
mailing list