]> granicus.if.org Git - llvm/commitdiff
Simplify the processFixupValue interface. NFC.
authorRafael Espindola <rafael.espindola@gmail.com>
Sat, 24 Jun 2017 06:00:03 +0000 (06:00 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Sat, 24 Jun 2017 06:00:03 +0000 (06:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306202 cdac9f57-aa62-4fd3-8940-286f4534e8a0

include/llvm/MC/MCAsmBackend.h
lib/MC/MCAssembler.cpp
lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp
lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
lib/Target/ARM/MCTargetDesc/ARMAsmBackend.h
lib/Target/Hexagon/MCTargetDesc/HexagonAsmBackend.cpp
lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp
lib/Target/Sparc/MCTargetDesc/SparcAsmBackend.cpp

index 81bc4f56320aa88650913c7373387a90849c3a36..a270973204f29c6c59cd93fd8000dc7e1e9083bd 100644 (file)
@@ -63,11 +63,8 @@ public:
   /// Target hook to adjust the literal value of a fixup if necessary.
   /// IsResolved signals whether the caller believes a relocation is needed; the
   /// target can modify the value. The default does nothing.
-  virtual void processFixupValue(const MCAssembler &Asm,
-                                 const MCAsmLayout &Layout,
-                                 const MCFixup &Fixup, const MCFragment *DF,
-                                 const MCValue &Target, uint64_t &Value,
-                                 bool &IsResolved) {}
+  virtual void processFixupValue(const MCAssembler &Asm, const MCFixup &Fixup,
+                                 const MCValue &Target, bool &IsResolved) {}
 
   /// 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
index 5802e175d1c60464aa9f2ab4d0fde2e7bb4a9fdc..92c5da0e9fef9ceed1bd05d174202f145cc4f9bb 100644 (file)
@@ -263,8 +263,7 @@ bool MCAssembler::evaluateFixup(const MCAsmLayout &Layout,
 
   // Let the backend adjust the fixup value if necessary, including whether
   // we need a relocation.
-  Backend.processFixupValue(*this, Layout, Fixup, DF, Target, Value,
-                            IsResolved);
+  Backend.processFixupValue(*this, Fixup, Target, IsResolved);
 
   return IsResolved;
 }
index 566adb0040c5c5c6d92204e37dedcd126ef11e18..3d075018904c085904166f6ca3107a3ffad9fb9e 100644 (file)
@@ -541,16 +541,14 @@ public:
     return createAArch64ELFObjectWriter(OS, OSABI, IsLittleEndian, IsILP32);
   }
 
-  void processFixupValue(const MCAssembler &Asm, const MCAsmLayout &Layout,
-                         const MCFixup &Fixup, const MCFragment *DF,
-                         const MCValue &Target, uint64_t &Value,
-                         bool &IsResolved) override;
+  void processFixupValue(const MCAssembler &Asm, const MCFixup &Fixup,
+                         const MCValue &Target, bool &IsResolved) override;
 };
 
-void ELFAArch64AsmBackend::processFixupValue(
-    const MCAssembler &Asm, const MCAsmLayout &Layout, const MCFixup &Fixup,
-    const MCFragment *DF, const MCValue &Target, uint64_t &Value,
-    bool &IsResolved) {
+void ELFAArch64AsmBackend::processFixupValue(const MCAssembler &Asm,
+                                             const MCFixup &Fixup,
+                                             const MCValue &Target,
+                                             bool &IsResolved) {
   // The ADRP instruction adds some multiple of 0x1000 to the current PC &
   // ~0xfff. This means that the required offset to reach a symbol can vary by
   // up to one step depending on where the ADRP is in memory. For example:
index 5a6f776eb9fd1878914a08de036acd040248f62c..81760f03940adf17bdd1e09768d254e32b4f444b 100644 (file)
@@ -739,11 +739,8 @@ unsigned ARMAsmBackend::adjustFixupValue(const MCAssembler &Asm,
 }
 
 void ARMAsmBackend::processFixupValue(const MCAssembler &Asm,
-                                      const MCAsmLayout &Layout,
                                       const MCFixup &Fixup,
-                                      const MCFragment *DF,
-                                      const MCValue &Target, uint64_t &Value,
-                                      bool &IsResolved) {
+                                      const MCValue &Target, bool &IsResolved) {
   const MCSymbolRefExpr *A = Target.getSymA();
   const MCSymbol *Sym = A ? &A->getSymbol() : nullptr;
   const unsigned FixupKind = Fixup.getKind() ;
index 42c902a9d0918432cf821dba6ba27505531e30fb..6a0ba2ed41c1aaa95563273c7aa64e63e23fdfc3 100644 (file)
@@ -40,10 +40,8 @@ public:
 
   /// processFixupValue - Target hook to process the literal value of a fixup
   /// if necessary.
-  void processFixupValue(const MCAssembler &Asm, const MCAsmLayout &Layout,
-                         const MCFixup &Fixup, const MCFragment *DF,
-                         const MCValue &Target, uint64_t &Value,
-                         bool &IsResolved) override;
+  void processFixupValue(const MCAssembler &Asm, const MCFixup &Fixup,
+                         const MCValue &Target, bool &IsResolved) override;
 
   unsigned adjustFixupValue(const MCAssembler &Asm, const MCFixup &Fixup,
                             const MCValue &Target, uint64_t Value, bool IsPCRel,
index 12ba9ee92ed757cff3ceffb4e23fb6b1fd8f2318..093ce80bc2e3f4810911b7854b1a926ae9fb61e4 100644 (file)
@@ -202,10 +202,8 @@ public:
   /// processFixupValue - Target hook to adjust the literal value of a fixup
   /// if necessary. IsResolved signals whether the caller believes a relocation
   /// is needed; the target can modify the value. The default does nothing.
-  void processFixupValue(const MCAssembler &Asm, const MCAsmLayout &Layout,
-                         const MCFixup &Fixup, const MCFragment *DF,
-                         const MCValue &Target, uint64_t &Value,
-                         bool &IsResolved) override {
+  void processFixupValue(const MCAssembler &Asm, const MCFixup &Fixup,
+                         const MCValue &Target, bool &IsResolved) override {
     MCFixupKind Kind = Fixup.getKind();
 
     switch((unsigned)Kind) {
index d22161cca67d954a64d3a3b94707fd47e072b208..6d7eb786a683532a0c910e152edca84c07829152 100644 (file)
@@ -131,10 +131,8 @@ public:
     }
   }
 
-  void processFixupValue(const MCAssembler &Asm, const MCAsmLayout &Layout,
-                         const MCFixup &Fixup, const MCFragment *DF,
-                         const MCValue &Target, uint64_t &Value,
-                         bool &IsResolved) override {
+  void processFixupValue(const MCAssembler &Asm, const MCFixup &Fixup,
+                         const MCValue &Target, bool &IsResolved) override {
     switch ((PPC::Fixups)Fixup.getKind()) {
     default: break;
     case PPC::fixup_ppc_br24:
index 835f5c0c36550e3d5b00f292704994c9ed119333..c72b47b090857d62a02db8d1378620416c8db88c 100644 (file)
@@ -203,10 +203,8 @@ namespace {
       return InfosBE[Kind - FirstTargetFixupKind];
     }
 
-    void processFixupValue(const MCAssembler &Asm, const MCAsmLayout &Layout,
-                           const MCFixup &Fixup, const MCFragment *DF,
-                           const MCValue &Target, uint64_t &Value,
-                           bool &IsResolved) override {
+    void processFixupValue(const MCAssembler &Asm, const MCFixup &Fixup,
+                           const MCValue &Target, bool &IsResolved) override {
       switch ((Sparc::Fixups)Fixup.getKind()) {
       default: break;
       case Sparc::fixup_sparc_wplt30: