Add support for sub-byte aligned writes to lib/Support/Endian.h
authorTeresa Johnson <tejohnson@google.com>
Wed, 30 Sep 2015 13:20:37 +0000 (13:20 +0000)
committerTeresa Johnson <tejohnson@google.com>
Wed, 30 Sep 2015 13:20:37 +0000 (13:20 +0000)
commit9260ee0d8842cbb642c762b38ac83ec6adcc2be0
treeaac28a725c382c5408e27634ebecde10352bcd88
parentae7fa1c52b0e5bb0d53da9759c1bc7a97893a65d
Add support for sub-byte aligned writes to lib/Support/Endian.h

Summary:
As per Duncan's review for D12536, I extracted the sub-byte bit aligned
reading and writing code into lib/Support, and generalized it. Added calls from
BackpatchWord. Also added unittests.

Reviewers: dexonsmith

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D13189

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248897 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Bitcode/BitstreamWriter.h
include/llvm/Support/Endian.h
unittests/Support/EndianTest.cpp