mirror of
https://github.com/intel/llvm.git
synced 2026-01-21 20:53:29 +08:00
[ELF] - Remove dead code from EhFrameSection::addCie. NFC.
Code was dead because caller of the addCie() already checks that ID is equal to 0: https://github.com/llvm-mirror/lld/blob/master/ELF/SyntheticSections.cpp#L431 llvm-svn: 337281
This commit is contained in:
@@ -368,15 +368,11 @@ EhFrameSection::EhFrameSection()
|
||||
// and where their relocations point to.
|
||||
template <class ELFT, class RelTy>
|
||||
CieRecord *EhFrameSection::addCie(EhSectionPiece &Cie, ArrayRef<RelTy> Rels) {
|
||||
auto *Sec = cast<EhInputSection>(Cie.Sec);
|
||||
if (read32(Cie.data().data() + 4) != 0)
|
||||
fatal(toString(Sec) + ": CIE expected at beginning of .eh_frame");
|
||||
|
||||
Symbol *Personality = nullptr;
|
||||
unsigned FirstRelI = Cie.FirstRelocation;
|
||||
if (FirstRelI != (unsigned)-1)
|
||||
Personality =
|
||||
&Sec->template getFile<ELFT>()->getRelocTargetSym(Rels[FirstRelI]);
|
||||
&Cie.Sec->template getFile<ELFT>()->getRelocTargetSym(Rels[FirstRelI]);
|
||||
|
||||
// Search for an existing CIE by CIE contents/relocation target pair.
|
||||
CieRecord *&Rec = CieMap[{Cie.data(), Personality}];
|
||||
|
||||
Reference in New Issue
Block a user