mirror of
https://github.com/intel/llvm.git
synced 2026-02-09 01:52:26 +08:00
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:
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user