commit | e87f33d9ce785668223c3bcc4e06956985cccda1 | [log] [tgz] |
---|---|---|
author | Craig Topper <craig.topper@sifive.com> | Thu Dec 07 13:17:58 2023 -0800 |
committer | GitHub <noreply@github.com> | Thu Dec 07 13:17:58 2023 -0800 |
tree | 2dc55857cbb49063f69b754b262c060d95b52280 | |
parent | ab4d6cd6d14cef1a167de1aea2fe44900d1d7309 [diff] [blame] |
[RISCV][MC] Pass MCSubtargetInfo down to shouldForceRelocation and evaluateTargetFixup. (#73721) Instead of using the STI stored in RISCVAsmBackend, try to get it from the MCFragment. This addresses the issue raised here https://discourse.llvm.org/t/possible-problem-related-to-subtarget-usage/75283
diff --git a/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp b/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp index 7eca49e..fc95b61 100644 --- a/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp +++ b/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp
@@ -544,7 +544,8 @@ bool MipsAsmBackend::shouldForceRelocation(const MCAssembler &Asm, const MCFixup &Fixup, - const MCValue &Target) { + const MCValue &Target, + const MCSubtargetInfo *STI) { if (Fixup.getKind() >= FirstLiteralRelocationKind) return true; const unsigned FixupKind = Fixup.getKind();