diff options
| author | Fangrui Song <i@maskray.me> | 2025-05-23 23:09:56 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-23 23:09:56 -0700 |
| commit | 871b0a32216770b84fe6fed412610ad03dafbf7f (patch) | |
| tree | d0ac80fef56795a27ce989f8391e8ca99318dec8 /llvm/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp | |
| parent | 84f06b88b64352e35fc8363081e58fd37e326452 (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.cpp | 5 |
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()); |
