diff options
author | George Rimar <grimar@accesssoftek.com> | 2018-06-22 13:21:37 +0000 |
---|---|---|
committer | George Rimar <grimar@accesssoftek.com> | 2018-06-22 13:21:37 +0000 |
commit | 50c6be963004fd0555a32c3517530f8c739af83f (patch) | |
tree | c3af639437700bfad2cf09a64e4fc6bc737691ee | |
parent | cfd9da038c5c702523f9481035c0e4e0ee9e28f3 (diff) | |
download | bcm5719-llvm-50c6be963004fd0555a32c3517530f8c739af83f.tar.gz bcm5719-llvm-50c6be963004fd0555a32c3517530f8c739af83f.zip |
[ELF] - ICF: remove excessive check. NFC.
Change removes the excessive comparsion of
the relocation arrays sizes.
This code was dead, because at the higer level,
equalsConstant function contains the following check:
`A->NumRelocations != B->NumRelocations`
where NumRelocations contains the size of the relocations array.
So removed check did the same job twice.
This was found with use of code coverage analysis.
llvm-svn: 335346
-rw-r--r-- | lld/ELF/ICF.cpp | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/lld/ELF/ICF.cpp b/lld/ELF/ICF.cpp index 8a595ce996a..9ede87733d2 100644 --- a/lld/ELF/ICF.cpp +++ b/lld/ELF/ICF.cpp @@ -239,9 +239,6 @@ template <class ELFT> template <class RelTy> bool ICF<ELFT>::constantEq(const InputSection *SecA, ArrayRef<RelTy> RA, const InputSection *SecB, ArrayRef<RelTy> RB) { - if (RA.size() != RB.size()) - return false; - for (size_t I = 0; I < RA.size(); ++I) { if (RA[I].r_offset != RB[I].r_offset || RA[I].getType(Config->IsMips64EL) != RB[I].getType(Config->IsMips64EL)) |