[lld] r261710 - ELF: Make some functions constant. NFC.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 23 16:23:13 PST 2016
Author: ruiu
Date: Tue Feb 23 18:23:13 2016
New Revision: 261710
URL: http://llvm.org/viewvc/llvm-project?rev=261710&view=rev
Log:
ELF: Make some functions constant. NFC.
This is a preparation for ICF.
Modified:
lld/trunk/ELF/InputSection.cpp
lld/trunk/ELF/InputSection.h
Modified: lld/trunk/ELF/InputSection.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputSection.cpp?rev=261710&r1=261709&r2=261710&view=diff
==============================================================================
--- lld/trunk/ELF/InputSection.cpp (original)
+++ lld/trunk/ELF/InputSection.cpp Tue Feb 23 18:23:13 2016
@@ -68,7 +68,7 @@ InputSectionBase<ELFT>::getOffset(const
// Returns a section that Rel relocation is pointing to.
template <class ELFT>
InputSectionBase<ELFT> *
-InputSectionBase<ELFT>::getRelocTarget(const Elf_Rel &Rel) {
+InputSectionBase<ELFT>::getRelocTarget(const Elf_Rel &Rel) const {
// Global symbol
uint32_t SymIndex = Rel.getSymbol(Config->Mips64EL);
if (SymbolBody *B = File->getSymbolBody(SymIndex))
@@ -83,7 +83,7 @@ InputSectionBase<ELFT>::getRelocTarget(c
template <class ELFT>
InputSectionBase<ELFT> *
-InputSectionBase<ELFT>::getRelocTarget(const Elf_Rela &Rel) {
+InputSectionBase<ELFT>::getRelocTarget(const Elf_Rela &Rel) const {
return getRelocTarget(reinterpret_cast<const Elf_Rel &>(Rel));
}
Modified: lld/trunk/ELF/InputSection.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputSection.h?rev=261710&r1=261709&r2=261710&view=diff
==============================================================================
--- lld/trunk/ELF/InputSection.h (original)
+++ lld/trunk/ELF/InputSection.h Tue Feb 23 18:23:13 2016
@@ -73,8 +73,8 @@ public:
ArrayRef<uint8_t> getSectionData() const;
// Returns a section that Rel is pointing to. Used by the garbage collector.
- InputSectionBase<ELFT> *getRelocTarget(const Elf_Rel &Rel);
- InputSectionBase<ELFT> *getRelocTarget(const Elf_Rela &Rel);
+ InputSectionBase<ELFT> *getRelocTarget(const Elf_Rel &Rel) const;
+ InputSectionBase<ELFT> *getRelocTarget(const Elf_Rela &Rel) const;
template <bool isRela>
using RelIteratorRange =
More information about the llvm-commits
mailing list