[lld] r335471 - Revert r335460 "[ELF] - ICF: Remove dead code. NFC."
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 25 06:46:40 PDT 2018
Author: grimar
Date: Mon Jun 25 06:46:39 2018
New Revision: 335471
URL: http://llvm.org/viewvc/llvm-project?rev=335471&view=rev
Log:
Revert r335460 "[ELF] - ICF: Remove dead code. NFC."
My mistake, it was not NFC.
Modified:
lld/trunk/ELF/ICF.cpp
Modified: lld/trunk/ELF/ICF.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/ICF.cpp?rev=335471&r1=335470&r2=335471&view=diff
==============================================================================
--- lld/trunk/ELF/ICF.cpp (original)
+++ lld/trunk/ELF/ICF.cpp Mon Jun 25 06:46:39 2018
@@ -267,6 +267,9 @@ bool ICF<ELFT>::constantEq(const InputSe
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)) {
More information about the llvm-commits
mailing list