From 8c73dfb6bf8eeac9e8e458a09aa2a9875c3888a2 Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Fri, 18 Sep 2015 02:15:34 +0000 Subject: [PATCH] COFF: Remove useless micro-optimization. This patch simplifies code by removing micro-optimization that doesn't contribute to speed. llvm-svn: 247964 --- lld/COFF/ICF.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/lld/COFF/ICF.cpp b/lld/COFF/ICF.cpp index 69725dad78a0..840ff2eb1ccd 100644 --- a/lld/COFF/ICF.cpp +++ b/lld/COFF/ICF.cpp @@ -137,8 +137,6 @@ bool ICF::equalsVariable(const SectionChunk *A, const SectionChunk *B) { auto Eq = [&](const coff_relocation &R1, const coff_relocation &R2) { SymbolBody *B1 = A->File->getSymbolBody(R1.SymbolTableIndex)->repl(); SymbolBody *B2 = B->File->getSymbolBody(R2.SymbolTableIndex)->repl(); - if (B1 == B2) - return true; auto *D1 = dyn_cast(B1); auto *D2 = dyn_cast(B2); return D1 && D2 && D1->getChunk()->GroupID == D2->getChunk()->GroupID;