[all-commits] [llvm/llvm-project] d4ec33: [lld-macho][nfc] Refactor to accommodate paired re...
Greg McGary via All-commits
all-commits at lists.llvm.org
Thu Dec 17 20:22:38 PST 2020
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d4ec3346b1baf31819d20a8950ced8be8f66a408
https://github.com/llvm/llvm-project/commit/d4ec3346b1baf31819d20a8950ced8be8f66a408
Author: Greg McGary <gkm at fb.com>
Date: 2020-12-17 (Thu, 17 Dec 2020)
Changed paths:
M lld/MachO/Arch/X86_64.cpp
M lld/MachO/InputFiles.cpp
M lld/MachO/Target.h
Log Message:
-----------
[lld-macho][nfc] Refactor to accommodate paired relocs
This is a refactor to pave the way for supporting paired-ADDEND for ARM64. The only paired reloc type for X86_64 is SUBTRACTOR. In a later diff, I will add SUBTRACTOR for both X86_64 and ARM64.
* s/`getImplicitAddend`/`getAddend`/ because it handles all forms of addend: implicit, explicit, paired.
* add predicate `bool isPairedReloc()`
* check range of `relInfo.r_symbolnum` is internal, unrelated to user-input, so use `assert()`, not `error()`
* minor cleanups & rearrangements in `InputFile::parseRelocations()`
Differential Revision: https://reviews.llvm.org/D90614
More information about the All-commits
mailing list