From fa3016839528e459016aa624121429b240004a8f Mon Sep 17 00:00:00 2001 From: Simon Atanasyan Date: Sat, 21 Jun 2014 08:36:12 +0000 Subject: [PATCH] [Mips] Remove redundant checking from the RelocationPass::isDynamic() function. No functional changes. llvm-svn: 211431 --- lld/lib/ReaderWriter/ELF/Mips/MipsRelocationPass.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/lld/lib/ReaderWriter/ELF/Mips/MipsRelocationPass.cpp b/lld/lib/ReaderWriter/ELF/Mips/MipsRelocationPass.cpp index 5e50725..237a733 100644 --- a/lld/lib/ReaderWriter/ELF/Mips/MipsRelocationPass.cpp +++ b/lld/lib/ReaderWriter/ELF/Mips/MipsRelocationPass.cpp @@ -479,14 +479,7 @@ bool RelocationPass::requireCopy(Reference &ref) { if (!_hasStaticRelocations.count(ref.target())) return false; const auto *sa = dyn_cast>(ref.target()); - if (sa && sa->type() != SharedLibraryAtom::Type::Data) - return false; - const auto *da = dyn_cast>(ref.target()); - if (da && da->contentType() != DefinedAtom::typeData) - return false; - if (isLocalCall(ref.target())) - return false; - return true; + return sa && sa->type() == SharedLibraryAtom::Type::Data; } template -- 2.7.4