[llvm] [RISCV][MC] Pass MCSubtargetInfo down to shouldForceRelocation and evaluateTargetFixup. (PR #73721)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Tue May 20 09:48:12 PDT 2025


================
@@ -101,7 +101,8 @@ class MCAsmBackend {
   /// Hook to check if a relocation is needed for some target specific reason.
   virtual bool shouldForceRelocation(const MCAssembler &Asm,
                                      const MCFixup &Fixup,
-                                     const MCValue &Target) {
+                                     const MCValue &Target,
+                                     const MCSubtargetInfo *STI) {
----------------
MaskRay wrote:

`STI`  was a compromise before the relocation generation mechanism became more stable. I plan to remove `STI` from shouldForceRelocation once #140692 lands.

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


More information about the llvm-commits mailing list