[PATCH] D109522: [JITLink] Adopt forEachRelocation() helper in ELF RISCV backend (NFC)

Stefan Gränitz via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 13 06:48:14 PDT 2021


sgraenitz added inline comments.


================
Comment at: llvm/lib/ExecutionEngine/JITLink/ELF_riscv.cpp:297
+          return make_error<StringError>(
+              "No SHT_REL in valid x64 ELF object files",
+              inconvertibleErrorCode());
----------------
StephenFan wrote:
> x64 -> riscv
Good catch! Actually, I made a copy/paste mistake here (from x86-64). This check didn't exist for RISCV. It'd be a functional change and thus I am going to drop it (even in case it's accurate for RISCV).


================
Comment at: llvm/lib/ExecutionEngine/JITLink/ELF_riscv.cpp:303
+
+      if (Error Err = Base::forEachRelocation(RelSect, std::move(Process)))
+        return Err;
----------------
jrtc27 wrote:
> std::move of a lambda is a strange thing to do
Agree. It's been a leftover from my previous std::function sketches. Latest version passes the member function pointer directly.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D109522



More information about the llvm-commits mailing list