Move getAddend to Relocations.h.

Because the function works on relocations, it should be in
Relocations.h instead of OutputSections.h.

llvm-svn: 274428
This commit is contained in:
Rui Ueyama
2016-07-02 08:50:03 +00:00
parent 29a4dd92b7
commit c98e4d8167
2 changed files with 10 additions and 10 deletions

View File

@@ -40,16 +40,6 @@ template <class ELFT> class SharedFile;
template <class ELFT> class SharedSymbol;
template <class ELFT> class DefinedRegular;
template <class ELFT>
static inline typename ELFT::uint getAddend(const typename ELFT::Rel &Rel) {
return 0;
}
template <class ELFT>
static inline typename ELFT::uint getAddend(const typename ELFT::Rela &Rel) {
return Rel.r_addend;
}
bool isValidCIdentifier(StringRef S);
// This represents a section in an output file.

View File

@@ -75,6 +75,16 @@ template <class ELFT> void scanRelocations(InputSection<ELFT> &);
template <class ELFT>
void scanRelocations(InputSectionBase<ELFT> &, const typename ELFT::Shdr &);
template <class ELFT>
static inline typename ELFT::uint getAddend(const typename ELFT::Rel &Rel) {
return 0;
}
template <class ELFT>
static inline typename ELFT::uint getAddend(const typename ELFT::Rela &Rel) {
return Rel.r_addend;
}
}
}