[Mips] Simplify the code. Replace redundant 'switch' operator by the single 'if'...
authorSimon Atanasyan <simon@atanasyan.com>
Tue, 11 Feb 2014 06:36:16 +0000 (06:36 +0000)
committerSimon Atanasyan <simon@atanasyan.com>
Tue, 11 Feb 2014 06:36:16 +0000 (06:36 +0000)
llvm-svn: 201131

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

index 80343ff..e2c290e 100644 (file)
@@ -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 &,