forked from OSchip/llvm-project
ELF: Make some functions constant. NFC.
This is a preparation for ICF. llvm-svn: 261710
This commit is contained in:
parent
436d91d835
commit
d7e4a281c4
|
@ -68,7 +68,7 @@ InputSectionBase<ELFT>::getOffset(const Elf_Sym &Sym) {
|
|||
// 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(const Elf_Rel &Rel) {
|
|||
|
||||
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));
|
||||
}
|
||||
|
||||
|
|
|
@ -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 =
|
||||
|
|
Loading…
Reference in New Issue