[llvm] 9f03bc3 - [MC] Remove unneeded MC*AsmBackend::fixupNeedsRelaxation overrides

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 1 14:03:32 PDT 2024


Author: Fangrui Song
Date: 2024-07-01T14:03:28-07:00
New Revision: 9f03bc3794423512dbca21accc21c98fe7b82b57

URL: https://github.com/llvm/llvm-project/commit/9f03bc3794423512dbca21accc21c98fe7b82b57
DIFF: https://github.com/llvm/llvm-project/commit/9f03bc3794423512dbca21accc21c98fe7b82b57.diff

LOG: [MC] Remove unneeded MC*AsmBackend::fixupNeedsRelaxation overrides

Follow-up to 88c0a8258800bbc72e7c0b0586436d4a1c62a260
("[MC] Make MCAsmBackend::fixupNeedsRelaxation not pure virtual").

Added: 
    

Modified: 
    llvm/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp
    llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.h

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp b/llvm/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp
index 251737ed12758..e96d0dab082fe 100644
--- a/llvm/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp
+++ b/llvm/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp
@@ -191,14 +191,6 @@ class PPCAsmBackend : public MCAsmBackend {
     }
   }
 
-  bool fixupNeedsRelaxation(const MCFixup &Fixup,
-                            uint64_t Value,
-                            const MCRelaxableFragment *DF,
-                            const MCAsmLayout &Layout) const override {
-    // FIXME.
-    llvm_unreachable("relaxInstruction() unimplemented");
-  }
-
   void relaxInstruction(MCInst &Inst,
                         const MCSubtargetInfo &STI) const override {
     // FIXME.

diff  --git a/llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.h b/llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.h
index 7bd95ccb7fb87..9ef1eaf394a1d 100644
--- a/llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.h
+++ b/llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.h
@@ -68,12 +68,6 @@ class RISCVAsmBackend : public MCAsmBackend {
                              const MCValue &Target,
                              const MCSubtargetInfo *STI) override;
 
-  bool fixupNeedsRelaxation(const MCFixup &Fixup, uint64_t Value,
-                            const MCRelaxableFragment *DF,
-                            const MCAsmLayout &Layout) const override {
-    llvm_unreachable("Handled by fixupNeedsRelaxationAdvanced");
-  }
-
   bool fixupNeedsRelaxationAdvanced(const MCAssembler &Asm,
                                     const MCFixup &Fixup, bool Resolved,
                                     uint64_t Value,


        


More information about the llvm-commits mailing list