diff options
| author | Rui Ueyama <ruiu@google.com> | 2015-06-15 03:00:15 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2015-06-15 03:00:15 +0000 |
| commit | 55144e24237646da66d5aa77851b3af134759b9a (patch) | |
| tree | 6ce61cd928ae16dd42e56310cec3cbe038b1b3d9 /llvm | |
| parent | 1c2e89a57abe63b1e21466ac1ccbcd5b4aad6c86 (diff) | |
| download | bcm5719-llvm-55144e24237646da66d5aa77851b3af134759b9a.tar.gz bcm5719-llvm-55144e24237646da66d5aa77851b3af134759b9a.zip | |
[Support][Endian] Define |= and &= for u{big,little}{16,32,64}_t.
llvm-svn: 239716
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/include/llvm/Support/Endian.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/include/llvm/Support/Endian.h b/llvm/include/llvm/Support/Endian.h index e9fe22e5eda..fd59009e0d3 100644 --- a/llvm/include/llvm/Support/Endian.h +++ b/llvm/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<PickAlignment<value_type, alignment>::value, sizeof(value_type)> Value; |

