diff --git a/include/llvm/Support/Endian.h b/include/llvm/Support/Endian.h index 75f3292ac4a..47b82fdc497 100644 --- a/include/llvm/Support/Endian.h +++ b/include/llvm/Support/Endian.h @@ -93,6 +93,16 @@ struct packed_endian_specific_integral { (void*)Value.buffer, newValue); } + packed_endian_specific_integral &operator+=(value_type newValue) { + *this = *this + newValue; + return *this; + } + + packed_endian_specific_integral &operator-=(value_type newValue) { + *this = *this - newValue; + return *this; + } + private: AlignedCharArray::value, sizeof(value_type)> Value;