[PATCH] D57939: Refactor RelocVisitor and fix computation of SHT_RELA-typed relocation entries
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 8 18:04:56 PST 2019
MaskRay added a comment.
`RelocVisitor.h -> RelocationResolver.cpp` there are so many differences that git doesn't consider it a rename.
`git diff 'HEAD^':include/llvm/Object/RelocVisitor.h lib/Object/RelocationResolver.cpp`
The member functions `visit*` have been made static functions. The changed indentation, changed signature probably make git think they are different chunks.
F8247494: a.diff <https://reviews.llvm.org/F8247494>
Anyway, we can see from below the structure of the architecture dispatch is kept.
patch
+ switch (Obj.getArch()) {
case Triple::x86_64:
- return visitX86_64(Rel, R, Value);
+ return resolveX86_64;
case Triple::aarch64:
case Triple::aarch64_be:
- return visitAarch64(Rel, R, Value);
+ return resolveAarch64;
case Triple::bpfel:
case Triple::bpfeb:
- return visitBpf(Rel, R, Value);
+ return resolveBpf;
case Triple::mips64el:
case Triple::mips64:
- return visitMips64(Rel, R, Value);
+ return resolveMips64;
case Triple::ppc64le:
case Triple::ppc64:
- return visitPPC64(Rel, R, Value);
+ return resolvePPC64;
case Triple::systemz:
- return visitSystemz(Rel, R, Value);
+ return resolveSystemz;
case Triple::sparcv9:
- return visitSparc64(Rel, R, Value);
+ return resolveSparc64;
case Triple::amdgcn:
- return visitAmdgpu(Rel, R, Value);
+ return resolveAmdgpu;
default:
- HasError = true;
- return 0;
+ return nullptr;
}
}
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57939/new/
https://reviews.llvm.org/D57939
More information about the llvm-commits
mailing list