From 06f8ea4c070972dda6b53996ed93a7569d9172ee Mon Sep 17 00:00:00 2001 From: Simon Atanasyan Date: Tue, 11 Feb 2014 06:36:16 +0000 Subject: [PATCH] [Mips] Simplify the code. Replace redundant 'switch' operator by the single 'if' one. llvm-svn: 201131 --- lld/lib/ReaderWriter/ELF/Mips/MipsLinkingContext.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) 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 &, -- 2.7.4