summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Rimar <grimar@accesssoftek.com>2018-06-25 12:51:55 +0000
committerGeorge Rimar <grimar@accesssoftek.com>2018-06-25 12:51:55 +0000
commitfb66ad5ea1c62a5d1fe77aefa4a945db1859ba5b (patch)
tree16ac267be7405aecc86224ed65d715fb69b6af80
parentda5cca4f438d69b36b363ccb632f8a3a98ef904a (diff)
downloadbcm5719-llvm-fb66ad5ea1c62a5d1fe77aefa4a945db1859ba5b.tar.gz
bcm5719-llvm-fb66ad5ea1c62a5d1fe77aefa4a945db1859ba5b.zip
[ELF] - ICF: Remove dead code. NFC.
Code is dead. We use only InputSections when building the list of sections elegible for the ICF: https://github.com/llvm-mirror/lld/blob/master/ELF/ICF.cpp#L439 And 'isEligible' filters out SyntheticSections as well for us. That way the only Kind we have in the Sections vector is SectionBase::Regular, so we do not need to check sections kind at all, it is always the same. llvm-svn: 335460
-rw-r--r--lld/ELF/ICF.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/lld/ELF/ICF.cpp b/lld/ELF/ICF.cpp
index 9ede87733d2..8822c8f63bf 100644
--- a/lld/ELF/ICF.cpp
+++ b/lld/ELF/ICF.cpp
@@ -267,9 +267,6 @@ bool ICF<ELFT>::constantEq(const InputSection *SecA, ArrayRef<RelTy> RA,
if (!DA->Section || !DB->Section)
return false;
- if (DA->Section->kind() != DB->Section->kind())
- return false;
-
// Relocations referring to InputSections are constant-equal if their
// section offsets are equal.
if (isa<InputSection>(DA->Section)) {
OpenPOWER on IntegriCloud