[lld] r274428 - Move getAddend to Relocations.h.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 2 01:50:03 PDT 2016
Author: ruiu
Date: Sat Jul 2 03:50:03 2016
New Revision: 274428
URL: http://llvm.org/viewvc/llvm-project?rev=274428&view=rev
Log:
Move getAddend to Relocations.h.
Because the function works on relocations, it should be in
Relocations.h instead of OutputSections.h.
Modified:
lld/trunk/ELF/OutputSections.h
lld/trunk/ELF/Relocations.h
Modified: lld/trunk/ELF/OutputSections.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.h?rev=274428&r1=274427&r2=274428&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.h (original)
+++ lld/trunk/ELF/OutputSections.h Sat Jul 2 03:50:03 2016
@@ -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.
Modified: lld/trunk/ELF/Relocations.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Relocations.h?rev=274428&r1=274427&r2=274428&view=diff
==============================================================================
--- lld/trunk/ELF/Relocations.h (original)
+++ lld/trunk/ELF/Relocations.h Sat Jul 2 03:50:03 2016
@@ -75,6 +75,16 @@ template <class ELFT> void scanRelocatio
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;
+}
}
}
More information about the llvm-commits
mailing list