[lld] r285956 - Update for llvm change.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 3 12:07:44 PDT 2016
Author: rafael
Date: Thu Nov 3 14:07:44 2016
New Revision: 285956
URL: http://llvm.org/viewvc/llvm-project?rev=285956&view=rev
Log:
Update for llvm change.
Modified:
lld/trunk/ELF/ICF.cpp
lld/trunk/ELF/InputSection.cpp
lld/trunk/ELF/MarkLive.cpp
lld/trunk/ELF/OutputSections.cpp
lld/trunk/ELF/Relocations.cpp
Modified: lld/trunk/ELF/ICF.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/ICF.cpp?rev=285956&r1=285955&r2=285956&view=diff
==============================================================================
--- lld/trunk/ELF/ICF.cpp (original)
+++ lld/trunk/ELF/ICF.cpp Thu Nov 3 14:07:44 2016
@@ -222,10 +222,10 @@ bool ICF<ELFT>::equalsConstant(const Inp
ELFFile<ELFT> &FileA = A->File->getObj();
ELFFile<ELFT> &FileB = B->File->getObj();
if (RA->sh_type == SHT_RELA) {
- if (!relocationEq(FileA.relas(RA), FileB.relas(RB)))
+ if (!relocationEq(check(FileA.relas(RA)), check(FileB.relas(RB))))
return false;
} else {
- if (!relocationEq(FileA.rels(RA), FileB.rels(RB)))
+ if (!relocationEq(check(FileA.rels(RA)), check(FileB.rels(RB))))
return false;
}
}
@@ -275,10 +275,10 @@ bool ICF<ELFT>::equalsVariable(const Inp
ELFFile<ELFT> &FileA = A->File->getObj();
ELFFile<ELFT> &FileB = B->File->getObj();
if (RA->sh_type == SHT_RELA) {
- if (!variableEq(A, B, FileA.relas(RA), FileB.relas(RB)))
+ if (!variableEq(A, B, check(FileA.relas(RA)), check(FileB.relas(RB))))
return false;
} else {
- if (!variableEq(A, B, FileA.rels(RA), FileB.rels(RB)))
+ if (!variableEq(A, B, check(FileA.rels(RA)), check(FileB.rels(RB))))
return false;
}
}
Modified: lld/trunk/ELF/InputSection.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputSection.cpp?rev=285956&r1=285955&r2=285956&view=diff
==============================================================================
--- lld/trunk/ELF/InputSection.cpp (original)
+++ lld/trunk/ELF/InputSection.cpp Thu Nov 3 14:07:44 2016
@@ -426,9 +426,9 @@ void InputSectionBase<ELFT>::relocate(ui
if (IS && !(IS->Flags & SHF_ALLOC)) {
for (const Elf_Shdr *RelSec : IS->RelocSections) {
if (RelSec->sh_type == SHT_RELA)
- IS->relocateNonAlloc(Buf, IS->File->getObj().relas(RelSec));
+ IS->relocateNonAlloc(Buf, check(IS->File->getObj().relas(RelSec)));
else
- IS->relocateNonAlloc(Buf, IS->File->getObj().rels(RelSec));
+ IS->relocateNonAlloc(Buf, check(IS->File->getObj().rels(RelSec)));
}
return;
}
@@ -565,9 +565,9 @@ template <class ELFT> void EhInputSectio
if (RelocSection) {
ELFFile<ELFT> &Obj = this->File->getObj();
if (RelocSection->sh_type == SHT_RELA)
- split(Obj.relas(RelocSection));
+ split(check(Obj.relas(RelocSection)));
else
- split(Obj.rels(RelocSection));
+ split(check(Obj.rels(RelocSection)));
return;
}
split(makeArrayRef<typename ELFT::Rela>(nullptr, nullptr));
Modified: lld/trunk/ELF/MarkLive.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/MarkLive.cpp?rev=285956&r1=285955&r2=285956&view=diff
==============================================================================
--- lld/trunk/ELF/MarkLive.cpp (original)
+++ lld/trunk/ELF/MarkLive.cpp Thu Nov 3 14:07:44 2016
@@ -83,10 +83,10 @@ static void forEachSuccessor(InputSectio
ELFFile<ELFT> &Obj = Sec.getFile()->getObj();
for (const typename ELFT::Shdr *RelSec : Sec.RelocSections) {
if (RelSec->sh_type == SHT_RELA) {
- for (const typename ELFT::Rela &Rel : Obj.relas(RelSec))
+ for (const typename ELFT::Rela &Rel : check(Obj.relas(RelSec)))
Fn(resolveReloc(Sec, Rel));
} else {
- for (const typename ELFT::Rel &Rel : Obj.rels(RelSec))
+ for (const typename ELFT::Rel &Rel : check(Obj.rels(RelSec)))
Fn(resolveReloc(Sec, Rel));
}
}
@@ -155,9 +155,9 @@ scanEhFrameSection(EhInputSection<ELFT>
ELFFile<ELFT> &EObj = EH.getFile()->getObj();
if (EH.RelocSection->sh_type == SHT_RELA)
- scanEhFrameSection(EH, EObj.relas(EH.RelocSection), Enqueue);
+ scanEhFrameSection(EH, check(EObj.relas(EH.RelocSection)), Enqueue);
else
- scanEhFrameSection(EH, EObj.rels(EH.RelocSection), Enqueue);
+ scanEhFrameSection(EH, check(EObj.rels(EH.RelocSection)), Enqueue);
}
// We do not garbage-collect two types of sections:
Modified: lld/trunk/ELF/OutputSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.cpp?rev=285956&r1=285955&r2=285956&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.cpp (original)
+++ lld/trunk/ELF/OutputSections.cpp Thu Nov 3 14:07:44 2016
@@ -1179,9 +1179,9 @@ void EhOutputSection<ELFT>::addSection(I
if (const Elf_Shdr *RelSec = Sec->RelocSection) {
ELFFile<ELFT> &Obj = Sec->getFile()->getObj();
if (RelSec->sh_type == SHT_RELA)
- addSectionAux(Sec, Obj.relas(RelSec));
+ addSectionAux(Sec, check(Obj.relas(RelSec)));
else
- addSectionAux(Sec, Obj.rels(RelSec));
+ addSectionAux(Sec, check(Obj.rels(RelSec)));
return;
}
addSectionAux(Sec, makeArrayRef<Elf_Rela>(nullptr, nullptr));
Modified: lld/trunk/ELF/Relocations.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Relocations.cpp?rev=285956&r1=285955&r2=285956&view=diff
==============================================================================
--- lld/trunk/ELF/Relocations.cpp (original)
+++ lld/trunk/ELF/Relocations.cpp Thu Nov 3 14:07:44 2016
@@ -778,9 +778,9 @@ void scanRelocations(InputSectionBase<EL
const typename ELFT::Shdr &RelSec) {
ELFFile<ELFT> &EObj = S.getFile()->getObj();
if (RelSec.sh_type == SHT_RELA)
- scanRelocs(S, EObj.relas(&RelSec));
+ scanRelocs(S, check(EObj.relas(&RelSec)));
else
- scanRelocs(S, EObj.rels(&RelSec));
+ scanRelocs(S, check(EObj.rels(&RelSec)));
}
template <class ELFT, class RelTy>
@@ -808,9 +808,9 @@ void createThunks(InputSectionBase<ELFT>
const typename ELFT::Shdr &RelSec) {
ELFFile<ELFT> &EObj = S.getFile()->getObj();
if (RelSec.sh_type == SHT_RELA)
- createThunks(S, EObj.relas(&RelSec));
+ createThunks(S, check(EObj.relas(&RelSec)));
else
- createThunks(S, EObj.rels(&RelSec));
+ createThunks(S, check(EObj.rels(&RelSec)));
}
template void scanRelocations<ELF32LE>(InputSectionBase<ELF32LE> &,
More information about the llvm-commits
mailing list