Small refactoring so that RelocNeedsGOT can stay in the target independent
side when the target specific bits are moved to the Target directory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147053 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/MC/ELFObjectWriter.h b/lib/MC/ELFObjectWriter.h
index 9adf0b1..3ba722c 100644
--- a/lib/MC/ELFObjectWriter.h
+++ b/lib/MC/ELFObjectWriter.h
@@ -351,7 +351,7 @@
protected:
virtual unsigned GetRelocType(const MCValue &Target, const MCFixup &Fixup,
bool IsPCRel, bool IsRelocWithSymbol,
- int64_t Addend) = 0;
+ int64_t Addend) const = 0;
virtual void adjustFixupOffset(const MCFixup &Fixup,
uint64_t &RelocOffset) {}
};
@@ -368,7 +368,7 @@
protected:
virtual unsigned GetRelocType(const MCValue &Target, const MCFixup &Fixup,
bool IsPCRel, bool IsRelocWithSymbol,
- int64_t Addend);
+ int64_t Addend) const;
};
@@ -395,11 +395,10 @@
virtual unsigned GetRelocType(const MCValue &Target, const MCFixup &Fixup,
bool IsPCRel, bool IsRelocWithSymbol,
- int64_t Addend);
+ int64_t Addend) const;
private:
unsigned GetRelocTypeInner(const MCValue &Target,
const MCFixup &Fixup, bool IsPCRel) const;
-
};
//===- PPCELFObjectWriter -------------------------------------------===//
@@ -414,7 +413,7 @@
protected:
virtual unsigned GetRelocType(const MCValue &Target, const MCFixup &Fixup,
bool IsPCRel, bool IsRelocWithSymbol,
- int64_t Addend);
+ int64_t Addend) const;
virtual void adjustFixupOffset(const MCFixup &Fixup, uint64_t &RelocOffset);
};
@@ -430,7 +429,7 @@
protected:
virtual unsigned GetRelocType(const MCValue &Target, const MCFixup &Fixup,
bool IsPCRel, bool IsRelocWithSymbol,
- int64_t Addend);
+ int64_t Addend) const;
};
//===- MipsELFObjectWriter -------------------------------------------===//
@@ -453,7 +452,7 @@
virtual unsigned GetRelocType(const MCValue &Target, const MCFixup &Fixup,
bool IsPCRel, bool IsRelocWithSymbol,
- int64_t Addend);
+ int64_t Addend) const;
};
}