[lld] r211431 - [Mips] Remove redundant checking from the RelocationPass::isDynamic() function.
Simon Atanasyan
simon at atanasyan.com
Sat Jun 21 01:36:14 PDT 2014
Author: atanasyan
Date: Sat Jun 21 03:36:12 2014
New Revision: 211431
URL: http://llvm.org/viewvc/llvm-project?rev=211431&view=rev
Log:
[Mips] Remove redundant checking from the RelocationPass::isDynamic() function.
No functional changes.
Modified:
lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationPass.cpp
Modified: lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationPass.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationPass.cpp?rev=211431&r1=211430&r2=211431&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationPass.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationPass.cpp Sat Jun 21 03:36:12 2014
@@ -479,14 +479,7 @@ bool RelocationPass<ELFT>::requireCopy(R
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>
More information about the llvm-commits
mailing list