From: Simon Atanasyan Date: Tue, 11 Feb 2014 06:36:16 +0000 (+0000) Subject: [Mips] Simplify the code. Replace redundant 'switch' operator by the single 'if'... X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=06f8ea4c070972dda6b53996ed93a7569d9172ee;p=platform%2Fupstream%2Fllvm.git [Mips] Simplify the code. Replace redundant 'switch' operator by the single 'if' one. llvm-svn: 201131 --- diff --git a/lld/lib/ReaderWriter/ELF/Mips/MipsLinkingContext.cpp b/lld/lib/ReaderWriter/ELF/Mips/MipsLinkingContext.cpp index 80343ff..e2c290e 100644 --- a/lld/lib/ReaderWriter/ELF/Mips/MipsLinkingContext.cpp +++ b/lld/lib/ReaderWriter/ELF/Mips/MipsLinkingContext.cpp @@ -50,13 +50,7 @@ bool MipsLinkingContext::isDynamicRelocation(const DefinedAtom &, 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 &,