[lld] r222322 - [Mips] Remove redundant const_cast

Simon Atanasyan simon at atanasyan.com
Tue Nov 18 21:50:59 PST 2014


Author: atanasyan
Date: Tue Nov 18 23:50:59 2014
New Revision: 222322

URL: http://llvm.org/viewvc/llvm-project?rev=222322&view=rev
Log:
[Mips] Remove redundant const_cast

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=222322&r1=222321&r2=222322&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationPass.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationPass.cpp Tue Nov 18 23:50:59 2014
@@ -522,7 +522,7 @@ template <typename ELFT> void Relocation
     ref.setKindValue(LLD_R_MIPS_GLOBAL_26);
 
     if (requireLA25Stub(ref.target()))
-      const_cast<Reference &>(ref).setTarget(getLA25Entry(ref.target()));
+      ref.setTarget(getLA25Entry(ref.target()));
   }
 
   const auto *sla = dyn_cast<SharedLibraryAtom>(ref.target());





More information about the llvm-commits mailing list