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

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 29 09:53:13 PST 2023


================
@@ -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) {
----------------
topperc wrote:

Where `handleFixup` is called in `layout` can pass nullptr since not all fragments have a subtarget.

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


More information about the llvm-commits mailing list