[lld] r201131 - [Mips] Simplify the code. Replace redundant 'switch' operator by the single 'if' one.
Simon Atanasyan
simon at atanasyan.com
Mon Feb 10 22:36:16 PST 2014
Author: atanasyan
Date: Tue Feb 11 00:36:16 2014
New Revision: 201131
URL: http://llvm.org/viewvc/llvm-project?rev=201131&view=rev
Log:
[Mips] Simplify the code. Replace redundant 'switch' operator by the single 'if' one.
Modified:
lld/trunk/lib/ReaderWriter/ELF/Mips/MipsLinkingContext.cpp
Modified: lld/trunk/lib/ReaderWriter/ELF/Mips/MipsLinkingContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Mips/MipsLinkingContext.cpp?rev=201131&r1=201130&r2=201131&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Mips/MipsLinkingContext.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Mips/MipsLinkingContext.cpp Tue Feb 11 00:36:16 2014
@@ -50,13 +50,7 @@ bool MipsLinkingContext::isDynamicReloca
const Reference &r) const {
if (r.kindNamespace() != Reference::KindNamespace::ELF)
return false;
-
- switch (r.kindValue()) {
- case llvm::ELF::R_MIPS_COPY:
- return true;
- default:
- return false;
- }
+ return r.kindValue() == llvm::ELF::R_MIPS_COPY;
}
bool MipsLinkingContext::isPLTRelocation(const DefinedAtom &,
More information about the llvm-commits
mailing list