Mark Permissions as a bitmask enum
authorPavel Labath <pavel@labath.sk>
Fri, 14 Dec 2018 13:51:20 +0000 (13:51 +0000)
committerPavel Labath <pavel@labath.sk>
Fri, 14 Dec 2018 13:51:20 +0000 (13:51 +0000)
commitb3ce98ac7c650c62a724611e2b7a27213cf1bcdc
tree4d70671ecaabd9f8464a58b30d61f25faa2aed16
parent941ce02deb3911b429387e2b97d270de4c257732
Mark Permissions as a bitmask enum

this allows one to use bitwise operators on the variables of this type
without complicated casting.

The gotcha here is that the combinations of these enums were being used
in some constexpr contexts such as case labels (case
ePermissionsWritable | ePermissionsExecutable:), which is not possible
if the user-defined operator| is not constexpr.

So, this commit also marks these operators as constexpr. I am committing
this as a small standalone patch so it can be easily reverted if some
compiler has an issue with this.

llvm-svn: 349149
lldb/include/lldb/lldb-enumerations.h