[llvm] MCAsmBackend: Simplify applyFixup (PR #141333)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Fri May 23 22:03:14 PDT 2025
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/141333
>From 9b6feeb77b82c570e68d7b3177890832723396a0 Mon Sep 17 00:00:00 2001
From: Fangrui Song <i at maskray.me>
Date: Fri, 23 May 2025 21:05:05 -0700
Subject: [PATCH] MCAsmBackend: Simplify applyFixup
Remove the MCSubtargetInfo argument from applyFixup, introduced in
https://reviews.llvm.org/D45962 , as it's only required by ARM. Instead,
add const MCFragment & so that ARMAsmBackend can retrieve
MCSubtargetInfo via a static member function.
Additionally, make applyReloc non-const. Its arguments now fully cover
addReloc's functionality.
---
llvm/include/llvm/MC/MCAsmBackend.h | 11 +++++-----
llvm/include/llvm/MC/MCAssembler.h | 5 ++---
llvm/lib/MC/MCAsmBackend.cpp | 21 ++++++++++++++++++
llvm/lib/MC/MCAssembler.cpp | 22 +++++++------------
.../MCTargetDesc/AArch64AsmBackend.cpp | 12 +++++-----
.../AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp | 13 +++++------
.../Target/ARM/MCTargetDesc/ARMAsmBackend.cpp | 10 ++++-----
.../Target/ARM/MCTargetDesc/ARMAsmBackend.h | 5 ++---
.../Target/AVR/MCTargetDesc/AVRAsmBackend.cpp | 7 +++---
.../Target/AVR/MCTargetDesc/AVRAsmBackend.h | 5 ++---
.../Target/BPF/MCTargetDesc/BPFAsmBackend.cpp | 12 +++++-----
.../CSKY/MCTargetDesc/CSKYAsmBackend.cpp | 7 +++---
.../Target/CSKY/MCTargetDesc/CSKYAsmBackend.h | 6 ++---
.../MCTargetDesc/DirectXMCTargetDesc.cpp | 5 ++---
.../MCTargetDesc/HexagonAsmBackend.cpp | 5 ++---
.../Lanai/MCTargetDesc/LanaiAsmBackend.cpp | 12 +++++-----
.../MCTargetDesc/LoongArchAsmBackend.cpp | 5 ++---
.../MCTargetDesc/LoongArchAsmBackend.h | 5 ++---
.../M68k/MCTargetDesc/M68kAsmBackend.cpp | 6 ++---
.../MSP430/MCTargetDesc/MSP430AsmBackend.cpp | 14 +++++-------
.../Mips/MCTargetDesc/MipsAsmBackend.cpp | 7 +++---
.../Target/Mips/MCTargetDesc/MipsAsmBackend.h | 5 ++---
.../PowerPC/MCTargetDesc/PPCAsmBackend.cpp | 5 ++---
.../RISCV/MCTargetDesc/RISCVAsmBackend.cpp | 7 +++---
.../RISCV/MCTargetDesc/RISCVAsmBackend.h | 5 ++---
.../SPIRV/MCTargetDesc/SPIRVAsmBackend.cpp | 5 ++---
.../Sparc/MCTargetDesc/SparcAsmBackend.cpp | 5 ++---
.../MCTargetDesc/SystemZMCAsmBackend.cpp | 10 ++++-----
.../Target/VE/MCTargetDesc/VEAsmBackend.cpp | 5 ++---
.../MCTargetDesc/WebAssemblyAsmBackend.cpp | 10 ++++-----
.../Target/X86/MCTargetDesc/X86AsmBackend.cpp | 13 +++++------
.../Xtensa/MCTargetDesc/XtensaAsmBackend.cpp | 12 +++++-----
32 files changed, 128 insertions(+), 149 deletions(-)
diff --git a/llvm/include/llvm/MC/MCAsmBackend.h b/llvm/include/llvm/MC/MCAsmBackend.h
index ec70dc8811185..fec1ec77a6686 100644
--- a/llvm/include/llvm/MC/MCAsmBackend.h
+++ b/llvm/include/llvm/MC/MCAsmBackend.h
@@ -123,12 +123,9 @@ class MCAsmBackend {
/// the offset specified by the fixup and following the fixup kind as
/// appropriate. Errors (such as an out of range fixup value) should be
/// reported via \p Ctx.
- /// The \p STI is present only for fragments of type MCRelaxableFragment and
- /// MCDataFragment with hasInstructions() == true.
- virtual void applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,
+ virtual void applyFixup(MCAssembler &, const MCFragment &, const MCFixup &,
const MCValue &Target, MutableArrayRef<char> Data,
- uint64_t Value, bool IsResolved,
- const MCSubtargetInfo *STI) const = 0;
+ uint64_t Value, bool IsResolved) = 0;
/// @}
@@ -216,6 +213,10 @@ class MCAsmBackend {
bool isDarwinCanonicalPersonality(const MCSymbol *Sym) const;
+ // Return STI for fragments of type MCRelaxableFragment and MCDataFragment
+ // with hasInstructions() == true.
+ static const MCSubtargetInfo *getSubtargetInfo(const MCFragment &F);
+
private:
const bool LinkerRelaxation;
};
diff --git a/llvm/include/llvm/MC/MCAssembler.h b/llvm/include/llvm/MC/MCAssembler.h
index becd7cf6e8d1b..ab6321f53a3c9 100644
--- a/llvm/include/llvm/MC/MCAssembler.h
+++ b/llvm/include/llvm/MC/MCAssembler.h
@@ -90,16 +90,15 @@ class MCAssembler {
/// Evaluate a fixup to a relocatable expression and the value which should be
/// placed into the fixup.
///
+ /// \param F The fragment the fixup is inside.
/// \param Fixup The fixup to evaluate.
- /// \param DF The fragment the fixup is inside.
/// \param Target [out] On return, the relocatable expression the fixup
/// evaluates to.
/// \param Value [out] On return, the value of the fixup as currently laid
/// out.
/// \param RecordReloc Record relocation if needed.
/// relocation.
- bool evaluateFixup(const MCFixup &Fixup, const MCFragment *DF,
- MCValue &Target, const MCSubtargetInfo *STI,
+ bool evaluateFixup(const MCFragment *F, const MCFixup &Fixup, MCValue &Target,
uint64_t &Value, bool RecordReloc,
MutableArrayRef<char> Contents) const;
diff --git a/llvm/lib/MC/MCAsmBackend.cpp b/llvm/lib/MC/MCAsmBackend.cpp
index 189ac883c87a9..f8a790bcaf7f2 100644
--- a/llvm/lib/MC/MCAsmBackend.cpp
+++ b/llvm/lib/MC/MCAsmBackend.cpp
@@ -143,3 +143,24 @@ bool MCAsmBackend::isDarwinCanonicalPersonality(const MCSymbol *Sym) const {
// Reserving an empty slot for it seems silly.
return name == "___gxx_personality_v0" || name == "___objc_personality_v0";
}
+
+const MCSubtargetInfo *MCAsmBackend::getSubtargetInfo(const MCFragment &F) {
+ const MCSubtargetInfo *STI = nullptr;
+ switch (F.getKind()) {
+ case MCFragment::FT_Data: {
+ auto &DF = cast<MCDataFragment>(F);
+ STI = DF.getSubtargetInfo();
+ assert(!DF.hasInstructions() || STI != nullptr);
+ break;
+ }
+ case MCFragment::FT_Relaxable: {
+ auto &RF = cast<MCRelaxableFragment>(F);
+ STI = RF.getSubtargetInfo();
+ assert(!RF.hasInstructions() || STI != nullptr);
+ break;
+ }
+ default:
+ break;
+ }
+ return STI;
+}
diff --git a/llvm/lib/MC/MCAssembler.cpp b/llvm/lib/MC/MCAssembler.cpp
index f71008826888f..0caf31dfc96f9 100644
--- a/llvm/lib/MC/MCAssembler.cpp
+++ b/llvm/lib/MC/MCAssembler.cpp
@@ -136,9 +136,9 @@ bool MCAssembler::isThumbFunc(const MCSymbol *Symbol) const {
return true;
}
-bool MCAssembler::evaluateFixup(const MCFixup &Fixup, const MCFragment *DF,
- MCValue &Target, const MCSubtargetInfo *STI,
- uint64_t &Value, bool RecordReloc,
+bool MCAssembler::evaluateFixup(const MCFragment *DF, const MCFixup &Fixup,
+ MCValue &Target, uint64_t &Value,
+ bool RecordReloc,
MutableArrayRef<char> Contents) const {
++stats::evaluateFixup;
@@ -200,8 +200,8 @@ bool MCAssembler::evaluateFixup(const MCFixup &Fixup, const MCFragment *DF,
IsResolved = false;
IsResolved = getBackend().addReloc(const_cast<MCAssembler &>(*this), *DF,
Fixup, Target, Value, IsResolved);
- getBackend().applyFixup(*this, Fixup, Target, Contents, Value, IsResolved,
- STI);
+ getBackend().applyFixup(const_cast<MCAssembler &>(*this), *DF, Fixup, Target,
+ Contents, Value, IsResolved);
return true;
}
@@ -906,7 +906,6 @@ void MCAssembler::layout() {
for (MCFragment &Frag : Sec) {
MutableArrayRef<MCFixup> Fixups;
MutableArrayRef<char> Contents;
- const MCSubtargetInfo *STI = nullptr;
// Process MCAlignFragment and MCEncodedFragmentWithFixups here.
switch (Frag.getKind()) {
@@ -924,16 +923,12 @@ void MCAssembler::layout() {
MCDataFragment &DF = cast<MCDataFragment>(Frag);
Fixups = DF.getFixups();
Contents = DF.getContents();
- STI = DF.getSubtargetInfo();
- assert(!DF.hasInstructions() || STI != nullptr);
break;
}
case MCFragment::FT_Relaxable: {
MCRelaxableFragment &RF = cast<MCRelaxableFragment>(Frag);
Fixups = RF.getFixups();
Contents = RF.getContents();
- STI = RF.getSubtargetInfo();
- assert(!RF.hasInstructions() || STI != nullptr);
break;
}
case MCFragment::FT_CVDefRange: {
@@ -970,7 +965,7 @@ void MCAssembler::layout() {
for (const MCFixup &Fixup : Fixups) {
uint64_t FixedValue;
MCValue Target;
- evaluateFixup(Fixup, &Frag, Target, STI, FixedValue,
+ evaluateFixup(&Frag, Fixup, Target, FixedValue,
/*RecordReloc=*/true, Contents);
}
}
@@ -991,9 +986,8 @@ bool MCAssembler::fixupNeedsRelaxation(const MCFixup &Fixup,
assert(getBackendPtr() && "Expected assembler backend");
MCValue Target;
uint64_t Value;
- bool Resolved =
- evaluateFixup(const_cast<MCFixup &>(Fixup), DF, Target,
- DF->getSubtargetInfo(), Value, /*RecordReloc=*/false, {});
+ bool Resolved = evaluateFixup(DF, const_cast<MCFixup &>(Fixup), Target, Value,
+ /*RecordReloc=*/false, {});
return getBackend().fixupNeedsRelaxationAdvanced(*this, Fixup, Target, Value,
Resolved);
}
diff --git a/llvm/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp b/llvm/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp
index 74f083cc8845e..d5bdb45ece633 100644
--- a/llvm/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp
+++ b/llvm/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp
@@ -81,10 +81,9 @@ class AArch64AsmBackend : public MCAsmBackend {
return Infos[Kind - FirstTargetFixupKind];
}
- void applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,
+ void applyFixup(MCAssembler &, const MCFragment &, const MCFixup &,
const MCValue &Target, MutableArrayRef<char> Data,
- uint64_t Value, bool IsResolved,
- const MCSubtargetInfo *STI) const override;
+ uint64_t Value, bool IsResolved) override;
bool fixupNeedsRelaxation(const MCFixup &Fixup,
uint64_t Value) const override;
@@ -415,11 +414,10 @@ unsigned AArch64AsmBackend::getFixupKindContainereSizeInBytes(unsigned Kind) con
}
}
-void AArch64AsmBackend::applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,
- const MCValue &Target,
+void AArch64AsmBackend::applyFixup(MCAssembler &Asm, const MCFragment &,
+ const MCFixup &Fixup, const MCValue &Target,
MutableArrayRef<char> Data, uint64_t Value,
- bool IsResolved,
- const MCSubtargetInfo *STI) const {
+ bool IsResolved) {
MCFixupKind Kind = Fixup.getKind();
if (mc::isRelocation(Kind))
return;
diff --git a/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp b/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp
index 9ec7c3595e555..978fc07c5c8d4 100644
--- a/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp
+++ b/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp
@@ -32,11 +32,9 @@ class AMDGPUAsmBackend : public MCAsmBackend {
public:
AMDGPUAsmBackend(const Target &T) : MCAsmBackend(llvm::endianness::little) {}
-
- void applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,
+ void applyFixup(MCAssembler &, const MCFragment &, const MCFixup &,
const MCValue &Target, MutableArrayRef<char> Data,
- uint64_t Value, bool IsResolved,
- const MCSubtargetInfo *STI) const override;
+ uint64_t Value, bool IsResolved) override;
bool fixupNeedsRelaxation(const MCFixup &Fixup,
uint64_t Value) const override;
@@ -133,11 +131,10 @@ static uint64_t adjustFixupValue(const MCFixup &Fixup, uint64_t Value,
}
}
-void AMDGPUAsmBackend::applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,
- const MCValue &Target,
+void AMDGPUAsmBackend::applyFixup(MCAssembler &Asm, const MCFragment &,
+ const MCFixup &Fixup, const MCValue &Target,
MutableArrayRef<char> Data, uint64_t Value,
- bool IsResolved,
- const MCSubtargetInfo *STI) const {
+ bool IsResolved) {
if (mc::isRelocation(Fixup.getKind()))
return;
diff --git a/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp b/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
index 66bbaef5d705d..765de83219078 100644
--- a/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
+++ b/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
@@ -1127,16 +1127,16 @@ static unsigned getFixupKindContainerSizeBytes(unsigned Kind) {
}
}
-void ARMAsmBackend::applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,
- const MCValue &Target,
+void ARMAsmBackend::applyFixup(MCAssembler &Asm, const MCFragment &F,
+ const MCFixup &Fixup, const MCValue &Target,
MutableArrayRef<char> Data, uint64_t Value,
- bool IsResolved,
- const MCSubtargetInfo* STI) const {
+ bool IsResolved) {
auto Kind = Fixup.getKind();
if (mc::isRelocation(Kind))
return;
MCContext &Ctx = Asm.getContext();
- Value = adjustFixupValue(Asm, Fixup, Target, Value, IsResolved, Ctx, STI);
+ Value = adjustFixupValue(Asm, Fixup, Target, Value, IsResolved, Ctx,
+ getSubtargetInfo(F));
if (!Value)
return; // Doesn't change encoding.
const unsigned NumBytes = getFixupKindNumBytes(Kind);
diff --git a/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.h b/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.h
index e8ade37e0ac5e..d4efa6fb9dfc4 100644
--- a/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.h
+++ b/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.h
@@ -38,10 +38,9 @@ class ARMAsmBackend : public MCAsmBackend {
bool IsResolved, MCContext &Ctx,
const MCSubtargetInfo *STI) const;
- void applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,
+ void applyFixup(MCAssembler &, const MCFragment &, const MCFixup &,
const MCValue &Target, MutableArrayRef<char> Data,
- uint64_t Value, bool IsResolved,
- const MCSubtargetInfo *STI) const override;
+ uint64_t Value, bool IsResolved) override;
unsigned getRelaxedOpcode(unsigned Op, const MCSubtargetInfo &STI) const;
diff --git a/llvm/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp b/llvm/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp
index dfe192ab7ee80..9651a436d8598 100644
--- a/llvm/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp
+++ b/llvm/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp
@@ -384,11 +384,10 @@ bool AVRAsmBackend::addReloc(MCAssembler &Asm, const MCFragment &F,
return IsResolved;
}
-void AVRAsmBackend::applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,
- const MCValue &Target,
+void AVRAsmBackend::applyFixup(MCAssembler &Asm, const MCFragment &,
+ const MCFixup &Fixup, const MCValue &Target,
MutableArrayRef<char> Data, uint64_t Value,
- bool IsResolved,
- const MCSubtargetInfo *STI) const {
+ bool IsResolved) {
if (mc::isRelocation(Fixup.getKind()))
return;
adjustFixupValue(Fixup, Target, Value, &Asm.getContext());
diff --git a/llvm/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.h b/llvm/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.h
index d106a0d21a316..0ce563efcff1b 100644
--- a/llvm/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.h
+++ b/llvm/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.h
@@ -41,10 +41,9 @@ class AVRAsmBackend : public MCAsmBackend {
const MCValue &Target, uint64_t &FixedValue,
bool IsResolved) override;
- void applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,
+ void applyFixup(MCAssembler &, const MCFragment &, const MCFixup &,
const MCValue &Target, MutableArrayRef<char> Data,
- uint64_t Value, bool IsResolved,
- const MCSubtargetInfo *STI) const override;
+ uint64_t Value, bool IsResolved) override;
std::optional<MCFixupKind> getFixupKind(StringRef Name) const override;
MCFixupKindInfo getFixupKindInfo(MCFixupKind Kind) const override;
diff --git a/llvm/lib/Target/BPF/MCTargetDesc/BPFAsmBackend.cpp b/llvm/lib/Target/BPF/MCTargetDesc/BPFAsmBackend.cpp
index d2610e8a74457..4ab424472fdec 100644
--- a/llvm/lib/Target/BPF/MCTargetDesc/BPFAsmBackend.cpp
+++ b/llvm/lib/Target/BPF/MCTargetDesc/BPFAsmBackend.cpp
@@ -27,10 +27,9 @@ class BPFAsmBackend : public MCAsmBackend {
BPFAsmBackend(llvm::endianness Endian) : MCAsmBackend(Endian) {}
~BPFAsmBackend() override = default;
- void applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,
+ void applyFixup(MCAssembler &, const MCFragment &, const MCFixup &,
const MCValue &Target, MutableArrayRef<char> Data,
- uint64_t Value, bool IsResolved,
- const MCSubtargetInfo *STI) const override;
+ uint64_t Value, bool IsResolved) override;
std::unique_ptr<MCObjectTargetWriter>
createObjectTargetWriter() const override;
@@ -67,11 +66,10 @@ bool BPFAsmBackend::writeNopData(raw_ostream &OS, uint64_t Count,
return true;
}
-void BPFAsmBackend::applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,
- const MCValue &Target,
+void BPFAsmBackend::applyFixup(MCAssembler &Asm, const MCFragment &,
+ const MCFixup &Fixup, const MCValue &Target,
MutableArrayRef<char> Data, uint64_t Value,
- bool IsResolved,
- const MCSubtargetInfo *STI) const {
+ bool IsResolved) {
if (Fixup.getKind() == FK_SecRel_8) {
// The Value is 0 for global variables, and the in-section offset
// for static variables. Write to the immediate field of the inst.
diff --git a/llvm/lib/Target/CSKY/MCTargetDesc/CSKYAsmBackend.cpp b/llvm/lib/Target/CSKY/MCTargetDesc/CSKYAsmBackend.cpp
index 0c710b8ecdfef..c47367412d29c 100644
--- a/llvm/lib/Target/CSKY/MCTargetDesc/CSKYAsmBackend.cpp
+++ b/llvm/lib/Target/CSKY/MCTargetDesc/CSKYAsmBackend.cpp
@@ -189,11 +189,10 @@ bool CSKYAsmBackend::fixupNeedsRelaxationAdvanced(const MCAssembler &,
}
}
-void CSKYAsmBackend::applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,
- const MCValue &Target,
+void CSKYAsmBackend::applyFixup(MCAssembler &Asm, const MCFragment &,
+ const MCFixup &Fixup, const MCValue &Target,
MutableArrayRef<char> Data, uint64_t Value,
- bool IsResolved,
- const MCSubtargetInfo *STI) const {
+ bool IsResolved) {
MCFixupKind Kind = Fixup.getKind();
if (mc::isRelocation(Kind))
return;
diff --git a/llvm/lib/Target/CSKY/MCTargetDesc/CSKYAsmBackend.h b/llvm/lib/Target/CSKY/MCTargetDesc/CSKYAsmBackend.h
index 33aaf985577ec..96672fd9213a1 100644
--- a/llvm/lib/Target/CSKY/MCTargetDesc/CSKYAsmBackend.h
+++ b/llvm/lib/Target/CSKY/MCTargetDesc/CSKYAsmBackend.h
@@ -22,11 +22,9 @@ class CSKYAsmBackend : public MCAsmBackend {
CSKYAsmBackend(const MCSubtargetInfo &STI, const MCTargetOptions &OP)
: MCAsmBackend(llvm::endianness::little) {}
-
- void applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,
+ void applyFixup(MCAssembler &, const MCFragment &, const MCFixup &,
const MCValue &Target, MutableArrayRef<char> Data,
- uint64_t Value, bool IsResolved,
- const MCSubtargetInfo *STI) const override;
+ uint64_t Value, bool IsResolved) override;
MCFixupKindInfo getFixupKindInfo(MCFixupKind Kind) const override;
diff --git a/llvm/lib/Target/DirectX/MCTargetDesc/DirectXMCTargetDesc.cpp b/llvm/lib/Target/DirectX/MCTargetDesc/DirectXMCTargetDesc.cpp
index 02baa1fcd1406..f5c67a6e0c034 100644
--- a/llvm/lib/Target/DirectX/MCTargetDesc/DirectXMCTargetDesc.cpp
+++ b/llvm/lib/Target/DirectX/MCTargetDesc/DirectXMCTargetDesc.cpp
@@ -77,10 +77,9 @@ class DXILAsmBackend : public MCAsmBackend {
: MCAsmBackend(llvm::endianness::little) {}
~DXILAsmBackend() override = default;
- void applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,
+ void applyFixup(MCAssembler &, const MCFragment &, const MCFixup &,
const MCValue &Target, MutableArrayRef<char> Data,
- uint64_t Value, bool IsResolved,
- const MCSubtargetInfo *STI) const override {}
+ uint64_t Value, bool IsResolved) override {}
std::unique_ptr<MCObjectTargetWriter>
createObjectTargetWriter() const override {
diff --git a/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonAsmBackend.cpp b/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonAsmBackend.cpp
index 0aa6e63a06fe4..5a92cc2cfd545 100644
--- a/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonAsmBackend.cpp
+++ b/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonAsmBackend.cpp
@@ -407,10 +407,9 @@ class HexagonAsmBackend : public MCAsmBackend {
/// ApplyFixup - Apply the \arg Value for given \arg Fixup into the provided
/// data fragment, at the offset specified by the fixup and following the
/// fixup kind as appropriate.
- void applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,
+ void applyFixup(MCAssembler &Asm, const MCFragment &, const MCFixup &Fixup,
const MCValue &Target, MutableArrayRef<char> Data,
- uint64_t FixupValue, bool IsResolved,
- const MCSubtargetInfo *STI) const override {
+ uint64_t FixupValue, bool IsResolved) override {
// When FixupValue is 0 the relocation is external and there
// is nothing for us to do.
diff --git a/llvm/lib/Target/Lanai/MCTargetDesc/LanaiAsmBackend.cpp b/llvm/lib/Target/Lanai/MCTargetDesc/LanaiAsmBackend.cpp
index 0a5f37f31296c..80e158aa7882b 100644
--- a/llvm/lib/Target/Lanai/MCTargetDesc/LanaiAsmBackend.cpp
+++ b/llvm/lib/Target/Lanai/MCTargetDesc/LanaiAsmBackend.cpp
@@ -47,10 +47,9 @@ class LanaiAsmBackend : public MCAsmBackend {
LanaiAsmBackend(const Target &T, Triple::OSType OST)
: MCAsmBackend(llvm::endianness::big), OSType(OST) {}
- void applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,
+ void applyFixup(MCAssembler &, const MCFragment &, const MCFixup &,
const MCValue &Target, MutableArrayRef<char> Data,
- uint64_t Value, bool IsResolved,
- const MCSubtargetInfo *STI) const override;
+ uint64_t Value, bool IsResolved) override;
std::unique_ptr<MCObjectTargetWriter>
createObjectTargetWriter() const override;
@@ -72,11 +71,10 @@ bool LanaiAsmBackend::writeNopData(raw_ostream &OS, uint64_t Count,
return true;
}
-void LanaiAsmBackend::applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,
- const MCValue &Target,
+void LanaiAsmBackend::applyFixup(MCAssembler &Asm, const MCFragment &,
+ const MCFixup &Fixup, const MCValue &Target,
MutableArrayRef<char> Data, uint64_t Value,
- bool /*IsResolved*/,
- const MCSubtargetInfo * /*STI*/) const {
+ bool) {
MCFixupKind Kind = Fixup.getKind();
Value = adjustFixupValue(static_cast<unsigned>(Kind), Value);
diff --git a/llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchAsmBackend.cpp b/llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchAsmBackend.cpp
index 46d104ce50dd2..27dc0e6287e8c 100644
--- a/llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchAsmBackend.cpp
+++ b/llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchAsmBackend.cpp
@@ -140,12 +140,11 @@ static void fixupLeb128(MCContext &Ctx, const MCFixup &Fixup,
Ctx.reportError(Fixup.getLoc(), "Invalid uleb128 value!");
}
-void LoongArchAsmBackend::applyFixup(const MCAssembler &Asm,
+void LoongArchAsmBackend::applyFixup(MCAssembler &Asm, const MCFragment &,
const MCFixup &Fixup,
const MCValue &Target,
MutableArrayRef<char> Data, uint64_t Value,
- bool IsResolved,
- const MCSubtargetInfo *STI) const {
+ bool IsResolved) {
if (!Value)
return; // Doesn't change encoding.
diff --git a/llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchAsmBackend.h b/llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchAsmBackend.h
index 787bcb4a04af8..fce3ca64a5d78 100644
--- a/llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchAsmBackend.h
+++ b/llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchAsmBackend.h
@@ -39,10 +39,9 @@ class LoongArchAsmBackend : public MCAsmBackend {
const MCValue &Target, uint64_t &FixedValue,
bool IsResolved) override;
- void applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,
+ void applyFixup(MCAssembler &, const MCFragment &, const MCFixup &,
const MCValue &Target, MutableArrayRef<char> Data,
- uint64_t Value, bool IsResolved,
- const MCSubtargetInfo *STI) const override;
+ uint64_t Value, bool IsResolved) override;
// Return Size with extra Nop Bytes for alignment directive in code section.
bool shouldInsertExtraNopBytesForCodeAlign(const MCAlignFragment &AF,
diff --git a/llvm/lib/Target/M68k/MCTargetDesc/M68kAsmBackend.cpp b/llvm/lib/Target/M68k/MCTargetDesc/M68kAsmBackend.cpp
index 8eabc05008bd1..34c8a8b31e0d8 100644
--- a/llvm/lib/Target/M68k/MCTargetDesc/M68kAsmBackend.cpp
+++ b/llvm/lib/Target/M68k/MCTargetDesc/M68kAsmBackend.cpp
@@ -52,9 +52,9 @@ class M68kAsmBackend : public MCAsmBackend {
.CasesLower("m68020", "m68030", "m68040", true)
.Default(false)) {}
- void applyFixup(const MCAssembler &Asm, const MCFixup &Fixup, const MCValue &,
- MutableArrayRef<char> Data, uint64_t Value, bool,
- const MCSubtargetInfo *STI) const override {
+ void applyFixup(MCAssembler &, const MCFragment &, const MCFixup &Fixup,
+ const MCValue &, MutableArrayRef<char> Data, uint64_t Value,
+ bool) override {
unsigned Size = 1 << getFixupKindLog2Size(Fixup.getKind());
assert(Fixup.getOffset() + Size <= Data.size() && "Invalid fixup offset!");
diff --git a/llvm/lib/Target/MSP430/MCTargetDesc/MSP430AsmBackend.cpp b/llvm/lib/Target/MSP430/MCTargetDesc/MSP430AsmBackend.cpp
index cf237a9ba59c2..dd619f2e65e56 100644
--- a/llvm/lib/Target/MSP430/MCTargetDesc/MSP430AsmBackend.cpp
+++ b/llvm/lib/Target/MSP430/MCTargetDesc/MSP430AsmBackend.cpp
@@ -36,10 +36,9 @@ class MSP430AsmBackend : public MCAsmBackend {
: MCAsmBackend(llvm::endianness::little), OSABI(OSABI) {}
~MSP430AsmBackend() override = default;
- void applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,
+ void applyFixup(MCAssembler &, const MCFragment &, const MCFixup &,
const MCValue &Target, MutableArrayRef<char> Data,
- uint64_t Value, bool IsResolved,
- const MCSubtargetInfo *STI) const override;
+ uint64_t Value, bool IsResolved) override;
std::unique_ptr<MCObjectTargetWriter>
createObjectTargetWriter() const override {
@@ -104,11 +103,10 @@ uint64_t MSP430AsmBackend::adjustFixupValue(const MCFixup &Fixup,
}
}
-void MSP430AsmBackend::applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,
- const MCValue &Target,
- MutableArrayRef<char> Data,
- uint64_t Value, bool IsResolved,
- const MCSubtargetInfo *STI) const {
+void MSP430AsmBackend::applyFixup(MCAssembler &Asm, const MCFragment &,
+ const MCFixup &Fixup, const MCValue &Target,
+ MutableArrayRef<char> Data, uint64_t Value,
+ bool IsResolved) {
Value = adjustFixupValue(Fixup, Value, Asm.getContext());
MCFixupKindInfo Info = getFixupKindInfo(Fixup.getKind());
if (!Value)
diff --git a/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp b/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp
index 3cf485167a2f0..01553b88f3372 100644
--- a/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp
+++ b/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp
@@ -242,11 +242,10 @@ static unsigned calculateMMLEIndex(unsigned i) {
/// ApplyFixup - Apply the \p Value for given \p Fixup into the provided
/// data fragment, at the offset specified by the fixup and following the
/// fixup kind as appropriate.
-void MipsAsmBackend::applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,
- const MCValue &Target,
+void MipsAsmBackend::applyFixup(MCAssembler &Asm, const MCFragment &,
+ const MCFixup &Fixup, const MCValue &Target,
MutableArrayRef<char> Data, uint64_t Value,
- bool IsResolved,
- const MCSubtargetInfo *STI) const {
+ bool IsResolved) {
MCFixupKind Kind = Fixup.getKind();
MCContext &Ctx = Asm.getContext();
Value = adjustFixupValue(Fixup, Value, Ctx);
diff --git a/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.h b/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.h
index b518769e385bb..8557b91ba0380 100644
--- a/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.h
+++ b/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.h
@@ -39,10 +39,9 @@ class MipsAsmBackend : public MCAsmBackend {
std::unique_ptr<MCObjectTargetWriter>
createObjectTargetWriter() const override;
- void applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,
+ void applyFixup(MCAssembler &, const MCFragment &, const MCFixup &,
const MCValue &Target, MutableArrayRef<char> Data,
- uint64_t Value, bool IsResolved,
- const MCSubtargetInfo *STI) const override;
+ uint64_t Value, bool IsResolved) override;
std::optional<MCFixupKind> getFixupKind(StringRef Name) const override;
MCFixupKindInfo getFixupKindInfo(MCFixupKind Kind) const override;
diff --git a/llvm/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp b/llvm/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp
index 7751ba4a13bd1..44c01d1a5847f 100644
--- a/llvm/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp
+++ b/llvm/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp
@@ -146,10 +146,9 @@ class PPCAsmBackend : public MCAsmBackend {
IsResolved);
}
- void applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,
+ void applyFixup(MCAssembler &, const MCFragment &, const MCFixup &Fixup,
const MCValue &Target, MutableArrayRef<char> Data,
- uint64_t Value, bool IsResolved,
- const MCSubtargetInfo *STI) const override {
+ uint64_t Value, bool IsResolved) override {
MCFixupKind Kind = Fixup.getKind();
if (mc::isRelocation(Kind))
return;
diff --git a/llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp b/llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp
index 1a31610a0a5e9..b431431bd2b86 100644
--- a/llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp
+++ b/llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp
@@ -679,11 +679,10 @@ bool RISCVAsmBackend::addReloc(MCAssembler &Asm, const MCFragment &F,
return false;
}
-void RISCVAsmBackend::applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,
- const MCValue &Target,
+void RISCVAsmBackend::applyFixup(MCAssembler &Asm, const MCFragment &,
+ const MCFixup &Fixup, const MCValue &Target,
MutableArrayRef<char> Data, uint64_t Value,
- bool IsResolved,
- const MCSubtargetInfo *STI) const {
+ bool IsResolved) {
MCFixupKind Kind = Fixup.getKind();
if (mc::isRelocation(Kind))
return;
diff --git a/llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.h b/llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.h
index d53a70d0aa585..97771303d8856 100644
--- a/llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.h
+++ b/llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.h
@@ -53,10 +53,9 @@ class RISCVAsmBackend : public MCAsmBackend {
const MCValue &Target, uint64_t &FixedValue,
bool IsResolved) override;
- void applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,
+ void applyFixup(MCAssembler &, const MCFragment &, const MCFixup &,
const MCValue &Target, MutableArrayRef<char> Data,
- uint64_t Value, bool IsResolved,
- const MCSubtargetInfo *STI) const override;
+ uint64_t Value, bool IsResolved) override;
std::unique_ptr<MCObjectTargetWriter>
createObjectTargetWriter() const override;
diff --git a/llvm/lib/Target/SPIRV/MCTargetDesc/SPIRVAsmBackend.cpp b/llvm/lib/Target/SPIRV/MCTargetDesc/SPIRVAsmBackend.cpp
index 3e4896c7378e3..6c2ddff450d44 100644
--- a/llvm/lib/Target/SPIRV/MCTargetDesc/SPIRVAsmBackend.cpp
+++ b/llvm/lib/Target/SPIRV/MCTargetDesc/SPIRVAsmBackend.cpp
@@ -20,10 +20,9 @@ class SPIRVAsmBackend : public MCAsmBackend {
public:
SPIRVAsmBackend(llvm::endianness Endian) : MCAsmBackend(Endian) {}
- void applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,
+ void applyFixup(MCAssembler &, const MCFragment &, const MCFixup &,
const MCValue &Target, MutableArrayRef<char> Data,
- uint64_t Value, bool IsResolved,
- const MCSubtargetInfo *STI) const override {}
+ uint64_t Value, bool IsResolved) override {}
std::unique_ptr<MCObjectTargetWriter>
createObjectTargetWriter() const override {
diff --git a/llvm/lib/Target/Sparc/MCTargetDesc/SparcAsmBackend.cpp b/llvm/lib/Target/Sparc/MCTargetDesc/SparcAsmBackend.cpp
index 9ef335a5af4a3..e0cb622b829f9 100644
--- a/llvm/lib/Target/Sparc/MCTargetDesc/SparcAsmBackend.cpp
+++ b/llvm/lib/Target/Sparc/MCTargetDesc/SparcAsmBackend.cpp
@@ -228,10 +228,9 @@ namespace {
ELFSparcAsmBackend(const MCSubtargetInfo &STI, Triple::OSType OSType)
: SparcAsmBackend(STI), OSType(OSType) {}
- void applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,
+ void applyFixup(MCAssembler &, const MCFragment &, const MCFixup &Fixup,
const MCValue &Target, MutableArrayRef<char> Data,
- uint64_t Value, bool IsResolved,
- const MCSubtargetInfo *STI) const override {
+ uint64_t Value, bool IsResolved) override {
if (!IsResolved)
return;
Value = adjustFixupValue(Fixup.getKind(), Value);
diff --git a/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmBackend.cpp b/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmBackend.cpp
index a456ae0c52e10..738b28da770ea 100644
--- a/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmBackend.cpp
+++ b/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmBackend.cpp
@@ -115,10 +115,9 @@ class SystemZMCAsmBackend : public MCAsmBackend {
MCFixupKindInfo getFixupKindInfo(MCFixupKind Kind) const override;
bool shouldForceRelocation(const MCAssembler &, const MCFixup &,
const MCValue &) override;
- void applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,
+ void applyFixup(MCAssembler &, const MCFragment &, const MCFixup &,
const MCValue &Target, MutableArrayRef<char> Data,
- uint64_t Value, bool IsResolved,
- const MCSubtargetInfo *STI) const override;
+ uint64_t Value, bool IsResolved) override;
bool writeNopData(raw_ostream &OS, uint64_t Count,
const MCSubtargetInfo *STI) const override;
};
@@ -161,12 +160,11 @@ bool SystemZMCAsmBackend::shouldForceRelocation(const MCAssembler &,
return Target.getSpecifier();
}
-void SystemZMCAsmBackend::applyFixup(const MCAssembler &Asm,
+void SystemZMCAsmBackend::applyFixup(MCAssembler &Asm, const MCFragment &,
const MCFixup &Fixup,
const MCValue &Target,
MutableArrayRef<char> Data, uint64_t Value,
- bool IsResolved,
- const MCSubtargetInfo *STI) const {
+ bool IsResolved) {
MCFixupKind Kind = Fixup.getKind();
if (mc::isRelocation(Kind))
return;
diff --git a/llvm/lib/Target/VE/MCTargetDesc/VEAsmBackend.cpp b/llvm/lib/Target/VE/MCTargetDesc/VEAsmBackend.cpp
index d51423942eec4..eb41afbb391f8 100644
--- a/llvm/lib/Target/VE/MCTargetDesc/VEAsmBackend.cpp
+++ b/llvm/lib/Target/VE/MCTargetDesc/VEAsmBackend.cpp
@@ -176,10 +176,9 @@ class ELFVEAsmBackend : public VEAsmBackend {
ELFVEAsmBackend(const Target &T, Triple::OSType OSType)
: VEAsmBackend(T), OSType(OSType) {}
- void applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,
+ void applyFixup(MCAssembler &, const MCFragment &, const MCFixup &Fixup,
const MCValue &Target, MutableArrayRef<char> Data,
- uint64_t Value, bool IsResolved,
- const MCSubtargetInfo *STI) const override {
+ uint64_t Value, bool IsResolved) override {
Value = adjustFixupValue(Fixup.getKind(), Value);
if (!Value)
return; // Doesn't change encoding.
diff --git a/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyAsmBackend.cpp b/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyAsmBackend.cpp
index 91a1db80deb3c..fc28034ea4307 100644
--- a/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyAsmBackend.cpp
+++ b/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyAsmBackend.cpp
@@ -38,10 +38,9 @@ class WebAssemblyAsmBackend final : public MCAsmBackend {
MCFixupKindInfo getFixupKindInfo(MCFixupKind Kind) const override;
- void applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,
+ void applyFixup(MCAssembler &, const MCFragment &, const MCFixup &,
const MCValue &Target, MutableArrayRef<char> Data,
- uint64_t Value, bool IsPCRel,
- const MCSubtargetInfo *STI) const override;
+ uint64_t Value, bool) override;
std::unique_ptr<MCObjectTargetWriter>
createObjectTargetWriter() const override;
@@ -80,12 +79,11 @@ bool WebAssemblyAsmBackend::writeNopData(raw_ostream &OS, uint64_t Count,
return true;
}
-void WebAssemblyAsmBackend::applyFixup(const MCAssembler &Asm,
+void WebAssemblyAsmBackend::applyFixup(MCAssembler &Asm, const MCFragment &,
const MCFixup &Fixup,
const MCValue &Target,
MutableArrayRef<char> Data,
- uint64_t Value, bool IsPCRel,
- const MCSubtargetInfo *STI) const {
+ uint64_t Value, bool) {
MCFixupKindInfo Info = getFixupKindInfo(Fixup.getKind());
assert(Info.Flags == 0 && "WebAssembly does not use MCFixupKindInfo flags");
diff --git a/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp b/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
index 7869856ced67d..45eb311919a67 100644
--- a/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
+++ b/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
@@ -172,10 +172,9 @@ class X86AsmBackend : public MCAsmBackend {
bool shouldForceRelocation(const MCAssembler &, const MCFixup &,
const MCValue &) override;
- void applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,
+ void applyFixup(MCAssembler &, const MCFragment &, const MCFixup &,
const MCValue &Target, MutableArrayRef<char> Data,
- uint64_t Value, bool IsResolved,
- const MCSubtargetInfo *STI) const override;
+ uint64_t Value, bool IsResolved) override;
bool mayNeedRelaxation(const MCInst &Inst,
const MCSubtargetInfo &STI) const override;
@@ -697,10 +696,10 @@ bool X86AsmBackend::shouldForceRelocation(const MCAssembler &, const MCFixup &,
return Target.getSpecifier();
}
-void X86AsmBackend::applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,
- const MCValue &, MutableArrayRef<char> Data,
- uint64_t Value, bool IsResolved,
- const MCSubtargetInfo *STI) const {
+void X86AsmBackend::applyFixup(MCAssembler &Asm, const MCFragment &,
+ const MCFixup &Fixup, const MCValue &,
+ MutableArrayRef<char> Data, uint64_t Value,
+ bool IsResolved) {
auto Kind = Fixup.getKind();
if (mc::isRelocation(Kind))
return;
diff --git a/llvm/lib/Target/Xtensa/MCTargetDesc/XtensaAsmBackend.cpp b/llvm/lib/Target/Xtensa/MCTargetDesc/XtensaAsmBackend.cpp
index 9dc31062528fd..01e0c4eac2b52 100644
--- a/llvm/lib/Target/Xtensa/MCTargetDesc/XtensaAsmBackend.cpp
+++ b/llvm/lib/Target/Xtensa/MCTargetDesc/XtensaAsmBackend.cpp
@@ -34,10 +34,9 @@ class XtensaAsmBackend : public MCAsmBackend {
IsLittleEndian(isLE) {}
MCFixupKindInfo getFixupKindInfo(MCFixupKind Kind) const override;
- void applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,
+ void applyFixup(MCAssembler &, const MCFragment &, const MCFixup &,
const MCValue &Target, MutableArrayRef<char> Data,
- uint64_t Value, bool IsResolved,
- const MCSubtargetInfo *STI) const override;
+ uint64_t Value, bool IsResolved) override;
bool mayNeedRelaxation(const MCInst &Inst,
const MCSubtargetInfo &STI) const override;
void relaxInstruction(MCInst &Inst,
@@ -144,11 +143,10 @@ static unsigned getSize(unsigned Kind) {
}
}
-void XtensaAsmBackend::applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,
- const MCValue &Target,
+void XtensaAsmBackend::applyFixup(MCAssembler &Asm, const MCFragment &,
+ const MCFixup &Fixup, const MCValue &Target,
MutableArrayRef<char> Data, uint64_t Value,
- bool IsResolved,
- const MCSubtargetInfo *STI) const {
+ bool IsResolved) {
MCContext &Ctx = Asm.getContext();
MCFixupKindInfo Info = getFixupKindInfo(Fixup.getKind());
More information about the llvm-commits
mailing list