[PATCH] D99633: [lld-macho][nfc] Refactor in preparation for 32-bit support
Vy Nguyen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 1 08:20:22 PDT 2021
oontvoo added inline comments.
================
Comment at: lld/MachO/Arch/ARM64.cpp:31
- int64_t getEmbeddedAddend(MemoryBufferRef, const section_64 &,
+ int64_t getEmbeddedAddend(MemoryBufferRef, uint64_t offset,
const relocation_info) const override;
----------------
seems inconsistent that this parameter has name and the other two don't
================
Comment at: lld/MachO/Arch/ARM64.cpp:49-50
+enum : uint64_t {
+ // Using this instead of target->wordSize allows the compiler to better
+ // optimize.
+ WordSize = 8,
----------------
Interesting. How so? (In the previous version I saw you were using `uint64_t WordSize = ...`, which makes more sense)
Can you explain why using an anonymous enum here is better than that?
================
Comment at: lld/MachO/Arch/X86_64.cpp:28
- int64_t getEmbeddedAddend(MemoryBufferRef, const section_64 &,
+ int64_t getEmbeddedAddend(MemoryBufferRef, uint64_t offset,
const relocation_info) const override;
----------------
maybe just `uint64_t` ?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99633/new/
https://reviews.llvm.org/D99633
More information about the llvm-commits
mailing list