summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Rimar <grimar@accesssoftek.com>2018-07-17 13:56:23 +0000
committerGeorge Rimar <grimar@accesssoftek.com>2018-07-17 13:56:23 +0000
commitb892e4194f2e6565ecc1e474d2b3e12c5d2a56ac (patch)
tree31b4903e409f0ff60fc856d87f4b8a41dd6dba75
parent1a4f3c93fb083c9449b255afb5f178c5982b3582 (diff)
downloadbcm5719-llvm-b892e4194f2e6565ecc1e474d2b3e12c5d2a56ac.tar.gz
bcm5719-llvm-b892e4194f2e6565ecc1e474d2b3e12c5d2a56ac.zip
[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
-rw-r--r--lld/ELF/SyntheticSections.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp
index 76ed63f2efd..27ba726cd7e 100644
--- a/lld/ELF/SyntheticSections.cpp
+++ b/lld/ELF/SyntheticSections.cpp
@@ -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}];
OpenPOWER on IntegriCloud