[PATCH] D56178: [Nios2] Update overrides to new virtual method signatures

Alan Lu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 31 12:09:03 PST 2018


cag created this revision.

Enabling Nios2 as an experimental target causes build to break because the overridden methods in Nios2AsmBackend do not have signatures matching the new ones in MCAsmBackend. This patch addresses that.


Repository:
  rL LLVM

https://reviews.llvm.org/D56178

Files:
  lib/Target/Nios2/MCTargetDesc/Nios2AsmBackend.cpp
  lib/Target/Nios2/MCTargetDesc/Nios2AsmBackend.h


Index: lib/Target/Nios2/MCTargetDesc/Nios2AsmBackend.h
===================================================================
--- lib/Target/Nios2/MCTargetDesc/Nios2AsmBackend.h
+++ lib/Target/Nios2/MCTargetDesc/Nios2AsmBackend.h
@@ -40,7 +40,7 @@
 
   void applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,
                   const MCValue &Target, MutableArrayRef<char> Data,
-                  uint64_t Value, bool IsResolved) const override;
+                  uint64_t Value, bool IsResolved, const MCSubtargetInfo *STI) const override;
 
   Optional<MCFixupKind> getFixupKind(StringRef Name) const override;
   const MCFixupKindInfo &getFixupKindInfo(MCFixupKind Kind) const override;
@@ -53,7 +53,9 @@
   /// relaxation.
   ///
   /// \param Inst - The instruction to test.
-  bool mayNeedRelaxation(const MCInst &Inst) const override { return false; }
+  /// \param STI - The MCSubtargetInfo in effect when the instruction was
+  /// encoded.
+  bool mayNeedRelaxation(const MCInst &Inst, const MCSubtargetInfo &STI) const override { return false; }
 
   /// fixupNeedsRelaxation - Target specific predicate for whether a given
   /// fixup requires the associated instruction to be relaxed.
Index: lib/Target/Nios2/MCTargetDesc/Nios2AsmBackend.cpp
===================================================================
--- lib/Target/Nios2/MCTargetDesc/Nios2AsmBackend.cpp
+++ lib/Target/Nios2/MCTargetDesc/Nios2AsmBackend.cpp
@@ -56,7 +56,8 @@
 void Nios2AsmBackend::applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,
                                  const MCValue &Target,
                                  MutableArrayRef<char> Data, uint64_t Value,
-                                 bool IsResolved) const {
+                                 bool IsResolved,
+                                 const MCSubtargetInfo *STI) const {
   MCFixupKind Kind = Fixup.getKind();
   Value = adjustFixupValue(Fixup, Value);
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56178.179773.patch
Type: text/x-patch
Size: 1934 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181231/7d396993/attachment.bin>


More information about the llvm-commits mailing list