From 97d92736f5d151d3b4ed664ef8d2e8fcda468c10 Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Mon, 21 Sep 2015 19:41:38 +0000 Subject: [PATCH] COFF: Improve section hash value. std::distance(C->Relocs.end(), C->Relocs.begin()) is the same as NumRelocs which is already added to the hash value. What we are missing here is the section size. llvm-svn: 248202 --- lld/COFF/ICF.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lld/COFF/ICF.cpp b/lld/COFF/ICF.cpp index 33208fff1784..5df3d5d06939 100644 --- a/lld/COFF/ICF.cpp +++ b/lld/COFF/ICF.cpp @@ -86,7 +86,7 @@ uint64_t ICF::getHash(SectionChunk *C) { hash_value(C->SectionName), C->NumRelocs, uint32_t(C->Header->SizeOfRawData), - std::distance(C->Relocs.end(), C->Relocs.begin()), + uint32_t(C->Header->SizeOfRawData), C->Checksum); }