[PATCH] D87486: [ELF] Define a reportRangeError() overload for thunks and tidy up recent PPC64 thunk range errors

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 11 09:32:00 PDT 2020


MaskRay added inline comments.


================
Comment at: lld/ELF/Relocations.cpp:116
 
+void elf::reportRangeError(uint8_t *loc, int64_t v, int n, const Symbol &sym,
+                           const Twine &msg) {
----------------
grimar wrote:
> I wonder if it should be a local helper function in `Thunks.cpp`, as it does not used anywhere else?
`getDefinedLocation(sym)` is a static function. Defining the helper in Thunks.cpp would replicate `getDefinedLocation(sym)`

I think it is fine to define the overloads in the same place to keep the style consistent.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87486/new/

https://reviews.llvm.org/D87486



More information about the llvm-commits mailing list