[Mips] Remove redundant checking from the RelocationPass::isDynamic() function.
authorSimon Atanasyan <simon@atanasyan.com>
Sat, 21 Jun 2014 08:36:12 +0000 (08:36 +0000)
committerSimon Atanasyan <simon@atanasyan.com>
Sat, 21 Jun 2014 08:36:12 +0000 (08:36 +0000)
No functional changes.

llvm-svn: 211431

lld/lib/ReaderWriter/ELF/Mips/MipsRelocationPass.cpp

index 5e50725..237a733 100644 (file)
@@ -479,14 +479,7 @@ bool RelocationPass<ELFT>::requireCopy(Reference &ref) {
   if (!_hasStaticRelocations.count(ref.target()))
     return false;
   const auto *sa = dyn_cast<ELFDynamicAtom<ELFT>>(ref.target());
-  if (sa && sa->type() != SharedLibraryAtom::Type::Data)
-    return false;
-  const auto *da = dyn_cast<ELFDefinedAtom<ELFT>>(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 <typename ELFT>