From: Rui Ueyama Date: Mon, 15 Jun 2015 03:00:15 +0000 (+0000) Subject: [Support][Endian] Define |= and &= for u{big,little}{16,32,64}_t. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=01e283181957305a72271b8873c898e9699d0e95;p=oota-llvm.git [Support][Endian] Define |= and &= for u{big,little}{16,32,64}_t. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239716 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Support/Endian.h b/include/llvm/Support/Endian.h index e9fe22e5eda..fd59009e0d3 100644 --- a/include/llvm/Support/Endian.h +++ b/include/llvm/Support/Endian.h @@ -104,6 +104,16 @@ struct packed_endian_specific_integral { return *this; } + 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;