[llvm] [Object] Add getRISCVVendorRelocationTypeName to render RISCV vendor-specific relocations to strings. (PR #168293)

Owen Anderson via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 16 14:38:44 PST 2025


================
@@ -191,6 +191,18 @@ StringRef llvm::object::getELFRelocationTypeName(uint32_t Machine,
 
 #undef ELF_RELOC
 
+#define ELF_RISCV_NONSTANDARD_RELOC(vendor, name, number)                      \
+  if (Vendor == #vendor && Type == number)                                     \
+    return #name;
----------------
resistor wrote:

I was copying the style from `getELFRelocationTypeName`, but sure.

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


More information about the llvm-commits mailing list