summaryrefslogtreecommitdiff
path: root/llvm/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2025-05-23 23:09:56 -0700
committerGitHub <noreply@github.com>2025-05-23 23:09:56 -0700
commit871b0a32216770b84fe6fed412610ad03dafbf7f (patch)
treed0ac80fef56795a27ce989f8391e8ca99318dec8 /llvm/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp
parent84f06b88b64352e35fc8363081e58fd37e326452 (diff)
MCAsmBackend: Simplify applyFixup (#141333)
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, remove the MCAssembler argument, which is also only required by ARM. Additionally, make applyReloc non-const. Its arguments now fully cover addReloc's functionality.
Diffstat (limited to 'llvm/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp')
-rw-r--r--llvm/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp b/llvm/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp
index 4235541508aa..77a9496fdea2 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,
+void AVRAsmBackend::applyFixup(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, &getContext());