[PATCH] D42421: [LLD][ELF] Make --fix-cortex-a53-843419 work on big endian hosts

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 23 08:23:18 PST 2018


Peter Smith via Phabricator <reviews at reviews.llvm.org> writes:


> +  const ulittle32_t *InstBuf = reinterpret_cast<const ulittle32_t *>(Buf + Off);

This is OK.

> +  ulittle32_t Instr1 = *InstBuf++;
> +  ulittle32_t Instr2 = *InstBuf++;
> +  ulittle32_t Instr3 = *InstBuf++;

But the values should still be uint32_t. The endian.h types should only
ever be used to form pointers.

Cheers,
Rafael


More information about the llvm-commits mailing list