[PATCH] Add function for consuming endian specific data from a buffer

Justin Bogner mail at justinbogner.com
Mon Mar 24 14:28:32 PDT 2014


This adds a function to Endian.h that reads from and updates a pointer
into a buffer with endian specific data. This is more convenient for
stream-like reading of data than endian::read.

The second patch is just a mechanical update of clang to use this rather
than rolling their own. I've included it to show what it looks like to
use this new API.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: endian-readnext.patch
Type: text/x-patch
Size: 1181 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140324/717c81e6/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: endian-readnext-uses.patch
Type: text/x-patch
Size: 31539 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140324/717c81e6/attachment-0001.bin>


More information about the llvm-commits mailing list