[lld] r287895 - Use a more explicit type for the sizeof.

Rafael Espindola via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 24 08:38:35 PST 2016


Author: rafael
Date: Thu Nov 24 10:38:35 2016
New Revision: 287895

URL: http://llvm.org/viewvc/llvm-project?rev=287895&view=rev
Log:
Use a more explicit type for the sizeof.

Modified:
    lld/trunk/ELF/SyntheticSections.cpp

Modified: lld/trunk/ELF/SyntheticSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SyntheticSections.cpp?rev=287895&r1=287894&r2=287895&view=diff
==============================================================================
--- lld/trunk/ELF/SyntheticSections.cpp (original)
+++ lld/trunk/ELF/SyntheticSections.cpp Thu Nov 24 10:38:35 2016
@@ -178,7 +178,7 @@ template <class ELFT> void MipsOptionsSe
 
   if (!Config->Relocatable)
     Reginfo.ri_gp_value = In<ELFT>::MipsGot->getGp();
-  memcpy(Buf + sizeof(typename ELFT::uint), &Reginfo, sizeof(Reginfo));
+  memcpy(Buf + sizeof(Elf_Mips_Options), &Reginfo, sizeof(Reginfo));
 }
 
 template <class ELFT>




More information about the llvm-commits mailing list