This is a preparation for ICF.
llvm-svn: 261710
// 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))
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));
}
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 =