[PATCH] Add {read,write}{16,32,64}{le,be} functions

Rui Ueyama ruiu at google.com
Thu Feb 26 18:18:28 PST 2015


Nothing wrong with reinterpret_cast<llvm::support::ulittle32_t *>(loc),
but that's redundant and not great from readability point of view.
The new functions are wrappers for that kind of reinterpet_casts.

Surprisingly or unsurprisingly, there was no use of big endian read
and write. {read,write}{16,32,64}be has no user. But I think they still
worth to be there in the header for completeness.

http://reviews.llvm.org/D7927

Files:
  include/lld/Core/Endian.h
  lib/ReaderWriter/ELF/AArch64/AArch64RelocationHandler.cpp
  lib/ReaderWriter/ELF/ARM/ARMRelocationHandler.cpp
  lib/ReaderWriter/ELF/Hexagon/HexagonRelocationHandler.cpp
  lib/ReaderWriter/ELF/X86/X86RelocationHandler.cpp
  lib/ReaderWriter/ELF/X86_64/X86_64RelocationHandler.cpp
  lib/ReaderWriter/PECOFF/IdataPass.cpp
  lib/ReaderWriter/PECOFF/ReaderImportHeader.cpp
  lib/ReaderWriter/PECOFF/WriterPECOFF.cpp

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7927.20813.patch
Type: text/x-patch
Size: 25949 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150227/e89bfab7/attachment.bin>


More information about the llvm-commits mailing list