summaryrefslogtreecommitdiff
path: root/include/llvm/Support/Endian.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Support/Endian.h')
-rw-r--r--include/llvm/Support/Endian.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/Support/Endian.h b/include/llvm/Support/Endian.h
index bc93c9a66eef9..cb5cd8e511b13 100644
--- a/include/llvm/Support/Endian.h
+++ b/include/llvm/Support/Endian.h
@@ -173,6 +173,10 @@ template<typename value_type,
endianness endian,
std::size_t alignment>
struct packed_endian_specific_integral {
+ packed_endian_specific_integral() = default;
+
+ explicit packed_endian_specific_integral(value_type val) { *this = val; }
+
operator value_type() const {
return endian::read<value_type, endian, alignment>(
(const void*)Value.buffer);