diff --git a/lld/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.cpp b/lld/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.cpp index a157c6b02b52..e27c6ac3b120 100644 --- a/lld/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.cpp +++ b/lld/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.cpp @@ -21,7 +21,7 @@ namespace { inline void applyReloc(uint8_t *location, uint32_t result) { auto target = reinterpret_cast(location); - *target = result | *target; + *target = result | uint32_t(*target); } /// \brief Calculate AHL value combines addends from 'hi' and 'lo' relocations.