[llvm] r306923 - [AVR] Update AVRASmBackend from API change in r306906

Dylan McKay via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 30 18:18:12 PDT 2017


Author: dylanmckay
Date: Fri Jun 30 18:18:12 2017
New Revision: 306923

URL: http://llvm.org/viewvc/llvm-project?rev=306923&view=rev
Log:
[AVR] Update AVRASmBackend from API change in r306906

Modified:
    llvm/trunk/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp
    llvm/trunk/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.h

Modified: llvm/trunk/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp?rev=306923&r1=306922&r2=306923&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp (original)
+++ llvm/trunk/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp Fri Jun 30 18:18:12 2017
@@ -449,16 +449,16 @@ bool AVRAsmBackend::writeNopData(uint64_
   return true;
 }
 
-void AVRAsmBackend::processFixupValue(const MCAssembler &Asm,
-                                      const MCFixup &Fixup,
-                                      const MCValue &Target, bool &IsResolved) {
+bool AVRAsmBackend::shouldForceRelocation(const MCAssembler &Asm,
+                                          const MCFixup &Fixup,
+                                          const MCValue &Target) {
   switch ((unsigned) Fixup.getKind()) {
+  default: return false;
   // Fixups which should always be recorded as relocations.
   case AVR::fixup_7_pcrel:
   case AVR::fixup_13_pcrel:
   case AVR::fixup_call:
-    IsResolved = false;
-    break;
+    return true;
   }
 }
 

Modified: llvm/trunk/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.h?rev=306923&r1=306922&r2=306923&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.h (original)
+++ llvm/trunk/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.h Fri Jun 30 18:18:12 2017
@@ -64,8 +64,8 @@ public:
 
   bool writeNopData(uint64_t Count, MCObjectWriter *OW) const override;
 
-  void processFixupValue(const MCAssembler &Asm, const MCFixup &Fixup,
-                         const MCValue &Target, bool &IsResolved) override;
+  bool shouldForceRelocation(const MCAssembler &Asm, const MCFixup &Fixup,
+                             const MCValue &Target) override;
 
 private:
   Triple::OSType OSType;




More information about the llvm-commits mailing list