diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2019-10-23 17:51:42 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2019-10-23 17:51:42 +0000 |
commit | 1d5ae1026e831016fc29fd927877c86af904481f (patch) | |
tree | 2cdfd12620fcfa5d9e4a0389f85368e8e36f63f9 /include/llvm/Support/Endian.h | |
parent | e6d1592492a3a379186bfb02bd0f4eda0669c0d5 (diff) |
Notes
Diffstat (limited to 'include/llvm/Support/Endian.h')
-rw-r--r-- | include/llvm/Support/Endian.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/llvm/Support/Endian.h b/include/llvm/Support/Endian.h index d8be94427d7e..87aecedd3a4b 100644 --- a/include/llvm/Support/Endian.h +++ b/include/llvm/Support/Endian.h @@ -203,9 +203,8 @@ inline void writeAtBitAlignment(void *memory, value_type value, namespace detail { -template<typename ValueType, - endianness Endian, - std::size_t Alignment> +template <typename ValueType, endianness Endian, std::size_t Alignment, + std::size_t ALIGN = PickAlignment<ValueType, Alignment>::value> struct packed_endian_specific_integral { using value_type = ValueType; static constexpr endianness endian = Endian; @@ -246,8 +245,9 @@ struct packed_endian_specific_integral { } private: - AlignedCharArray<PickAlignment<value_type, alignment>::value, - sizeof(value_type)> Value; + struct { + alignas(ALIGN) char buffer[sizeof(value_type)]; + } Value; public: struct ref { |