[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / libcxx / include / __filesystem / directory_options.h
blob699412fbe4b6acce74d45bbec9885218c2096e09
1 // -*- C++ -*-
2 //===----------------------------------------------------------------------===//
3 //
4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 // See https://llvm.org/LICENSE.txt for license information.
6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //
8 //===----------------------------------------------------------------------===//
10 #ifndef _LIBCPP___FILESYSTEM_DIRECTORY_OPTIONS_H
11 #define _LIBCPP___FILESYSTEM_DIRECTORY_OPTIONS_H
13 #include <__availability>
14 #include <__config>
16 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
17 # pragma GCC system_header
18 #endif
20 #ifndef _LIBCPP_CXX03_LANG
22 _LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
24 enum class directory_options : unsigned char {
25 none = 0,
26 follow_directory_symlink = 1,
27 skip_permission_denied = 2
30 _LIBCPP_INLINE_VISIBILITY
31 inline constexpr directory_options operator&(directory_options __lhs,
32 directory_options __rhs) {
33 return static_cast<directory_options>(static_cast<unsigned char>(__lhs) &
34 static_cast<unsigned char>(__rhs));
37 _LIBCPP_INLINE_VISIBILITY
38 inline constexpr directory_options operator|(directory_options __lhs,
39 directory_options __rhs) {
40 return static_cast<directory_options>(static_cast<unsigned char>(__lhs) |
41 static_cast<unsigned char>(__rhs));
44 _LIBCPP_INLINE_VISIBILITY
45 inline constexpr directory_options operator^(directory_options __lhs,
46 directory_options __rhs) {
47 return static_cast<directory_options>(static_cast<unsigned char>(__lhs) ^
48 static_cast<unsigned char>(__rhs));
51 _LIBCPP_INLINE_VISIBILITY
52 inline constexpr directory_options operator~(directory_options __lhs) {
53 return static_cast<directory_options>(~static_cast<unsigned char>(__lhs));
56 _LIBCPP_INLINE_VISIBILITY
57 inline directory_options& operator&=(directory_options& __lhs,
58 directory_options __rhs) {
59 return __lhs = __lhs & __rhs;
62 _LIBCPP_INLINE_VISIBILITY
63 inline directory_options& operator|=(directory_options& __lhs,
64 directory_options __rhs) {
65 return __lhs = __lhs | __rhs;
68 _LIBCPP_INLINE_VISIBILITY
69 inline directory_options& operator^=(directory_options& __lhs,
70 directory_options __rhs) {
71 return __lhs = __lhs ^ __rhs;
74 _LIBCPP_END_NAMESPACE_FILESYSTEM
76 #endif // _LIBCPP_CXX03_LANG
78 #endif // _LIBCPP___FILESYSTEM_DIRECTORY_OPTIONS_H