[lld] [lld] Add infrastructure for handling RISCV vendor-specific relocations. (PR #159987)

Sam Elliott via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 22 21:21:45 PDT 2025


================
@@ -33,6 +33,10 @@ class TargetInfo {
   virtual uint32_t calcEFlags() const { return 0; }
   virtual RelExpr getRelExpr(RelType type, const Symbol &s,
                              const uint8_t *loc) const = 0;
+  virtual RelExpr getVendorRelExpr(RelType type, const Symbol &s,
+                                   const uint8_t *loc, StringRef vendor) const {
+    return R_NONE;
----------------
lenary wrote:

I would prefer an assertion error of some kind here, as this base implementation should never be called.

https://github.com/llvm/llvm-project/pull/159987


More information about the llvm-commits mailing list