Add convenient functions for endianness-aware reads/writes to llvm::support::endian.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Probably doesn't really belong to Endian, but it would be nice to have some write8()/read8(). It can be used, e.g. for R_X86_64_8 handling.
Comment Actions
lgtm. We should also make sure to remove the 50 other versions of this we have spread throughout llvm.
Comment Actions
I deliberately excluded write8/read8 because single byte read has no
endianness issue. I understand that that feels good for completeness, but
they are for nonexistent issues. We could just cast to uint8_t and do the
stuff.