Use a more explicit type for the sizeof.
authorRafael Espindola <rafael.espindola@gmail.com>
Thu, 24 Nov 2016 16:38:35 +0000 (16:38 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Thu, 24 Nov 2016 16:38:35 +0000 (16:38 +0000)
llvm-svn: 287895

lld/ELF/SyntheticSections.cpp

index 4ac5764..8fdb10a 100644 (file)
@@ -178,7 +178,7 @@ template <class ELFT> void MipsOptionsSection<ELFT>::writeTo(uint8_t *Buf) {
 
   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>