[PATCH] D87780: [lld-macho] Export trie addresses should be relative to the image base
Jez Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 17 16:07:22 PDT 2020
int3 marked an inline comment as done.
int3 added inline comments.
================
Comment at: lld/MachO/ExportTrie.h:36
+ uint64_t imageBase = 0;
std::vector<const Symbol *> exported;
----------------
smeenai wrote:
> Nit: do we need this initialization, given that `setImageBase` should always be called?
I think it's good practice to zero-init fields that aren't initialized in the ctor. That way, if we forget to call `setImageBase`, we'll be more likely to get a deterministic error.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87780/new/
https://reviews.llvm.org/D87780
More information about the llvm-commits
mailing list