diff options
| author | Louis Dionne <ldionne@apple.com> | 2018-07-11 23:14:33 +0000 |
|---|---|---|
| committer | Louis Dionne <ldionne@apple.com> | 2018-07-11 23:14:33 +0000 |
| commit | dc7200b486b6c5b5229abcee97c160145cc3d955 (patch) | |
| tree | f4373ca956f1ba3ccf7bde5e1a396f9819472f60 /libcxx/include/system_error | |
| parent | 62c76db4eec8ef64a03c4b077045893bebfc38e9 (diff) | |
| download | bcm5719-llvm-dc7200b486b6c5b5229abcee97c160145cc3d955.tar.gz bcm5719-llvm-dc7200b486b6c5b5229abcee97c160145cc3d955.zip | |
[libc++] Take 2: Replace uses of _LIBCPP_ALWAYS_INLINE by _LIBCPP_INLINE_VISIBILITY
Summary:
We never actually mean to always inline a function -- all the uses of
the macro I could find are actually attempts to control the visibility
of symbols. This is better described by _LIBCPP_INLINE_VISIBILITY, which
is actually always defined the same.
This change is orthogonal to the decision of what we're actually going
to do with _LIBCPP_INLINE_VISIBILITY -- it just simplifies things by
having one canonical way of doing things.
Note that this commit had originally been applied in r336369 and then
reverted in r336382 because of unforeseen problems. Both of these problems
have now been fixed.
Reviewers: EricWF, mclow.lists
Subscribers: christof, dexonsmith, erikvanderpoel
Differential Revision: https://reviews.llvm.org/D48892
llvm-svn: 336866
Diffstat (limited to 'libcxx/include/system_error')
| -rw-r--r-- | libcxx/include/system_error | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/libcxx/include/system_error b/libcxx/include/system_error index f5d8d114562..917c710290a 100644 --- a/libcxx/include/system_error +++ b/libcxx/include/system_error @@ -203,7 +203,7 @@ public: defined(_LIBCPP_DEPRECATED_ABI_LEGACY_LIBRARY_DEFINITIONS_FOR_INLINE_FUNCTIONS) error_category() _NOEXCEPT; #else - _LIBCPP_ALWAYS_INLINE + _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 error_category() _NOEXCEPT _LIBCPP_DEFAULT #endif private: @@ -217,13 +217,13 @@ public: virtual bool equivalent(const error_code& __code, int __condition) const _NOEXCEPT; virtual string message(int __ev) const = 0; - _LIBCPP_ALWAYS_INLINE + _LIBCPP_INLINE_VISIBILITY bool operator==(const error_category& __rhs) const _NOEXCEPT {return this == &__rhs;} - _LIBCPP_ALWAYS_INLINE + _LIBCPP_INLINE_VISIBILITY bool operator!=(const error_category& __rhs) const _NOEXCEPT {return !(*this == __rhs);} - _LIBCPP_ALWAYS_INLINE + _LIBCPP_INLINE_VISIBILITY bool operator< (const error_category& __rhs) const _NOEXCEPT {return this < &__rhs;} friend class _LIBCPP_HIDDEN __do_message; @@ -244,21 +244,21 @@ class _LIBCPP_TYPE_VIS error_condition int __val_; const error_category* __cat_; public: - _LIBCPP_ALWAYS_INLINE + _LIBCPP_INLINE_VISIBILITY error_condition() _NOEXCEPT : __val_(0), __cat_(&generic_category()) {} - _LIBCPP_ALWAYS_INLINE + _LIBCPP_INLINE_VISIBILITY error_condition(int __val, const error_category& __cat) _NOEXCEPT : __val_(__val), __cat_(&__cat) {} template <class _Ep> - _LIBCPP_ALWAYS_INLINE + _LIBCPP_INLINE_VISIBILITY error_condition(_Ep __e, typename enable_if<is_error_condition_enum<_Ep>::value>::type* = 0 ) _NOEXCEPT {*this = make_error_condition(__e);} - _LIBCPP_ALWAYS_INLINE + _LIBCPP_INLINE_VISIBILITY void assign(int __val, const error_category& __cat) _NOEXCEPT { __val_ = __val; @@ -266,7 +266,7 @@ public: } template <class _Ep> - _LIBCPP_ALWAYS_INLINE + _LIBCPP_INLINE_VISIBILITY typename enable_if < is_error_condition_enum<_Ep>::value, @@ -275,21 +275,21 @@ public: operator=(_Ep __e) _NOEXCEPT {*this = make_error_condition(__e); return *this;} - _LIBCPP_ALWAYS_INLINE + _LIBCPP_INLINE_VISIBILITY void clear() _NOEXCEPT { __val_ = 0; __cat_ = &generic_category(); } - _LIBCPP_ALWAYS_INLINE + _LIBCPP_INLINE_VISIBILITY int value() const _NOEXCEPT {return __val_;} - _LIBCPP_ALWAYS_INLINE + _LIBCPP_INLINE_VISIBILITY const error_category& category() const _NOEXCEPT {return *__cat_;} string message() const; - _LIBCPP_ALWAYS_INLINE + _LIBCPP_INLINE_VISIBILITY _LIBCPP_EXPLICIT operator bool() const _NOEXCEPT {return __val_ != 0;} }; @@ -316,21 +316,21 @@ class _LIBCPP_TYPE_VIS error_code int __val_; const error_category* __cat_; public: - _LIBCPP_ALWAYS_INLINE + _LIBCPP_INLINE_VISIBILITY error_code() _NOEXCEPT : __val_(0), __cat_(&system_category()) {} - _LIBCPP_ALWAYS_INLINE + _LIBCPP_INLINE_VISIBILITY error_code(int __val, const error_category& __cat) _NOEXCEPT : __val_(__val), __cat_(&__cat) {} template <class _Ep> - _LIBCPP_ALWAYS_INLINE + _LIBCPP_INLINE_VISIBILITY error_code(_Ep __e, typename enable_if<is_error_code_enum<_Ep>::value>::type* = 0 ) _NOEXCEPT {*this = make_error_code(__e);} - _LIBCPP_ALWAYS_INLINE + _LIBCPP_INLINE_VISIBILITY void assign(int __val, const error_category& __cat) _NOEXCEPT { __val_ = __val; @@ -338,7 +338,7 @@ public: } template <class _Ep> - _LIBCPP_ALWAYS_INLINE + _LIBCPP_INLINE_VISIBILITY typename enable_if < is_error_code_enum<_Ep>::value, @@ -347,26 +347,26 @@ public: operator=(_Ep __e) _NOEXCEPT {*this = make_error_code(__e); return *this;} - _LIBCPP_ALWAYS_INLINE + _LIBCPP_INLINE_VISIBILITY void clear() _NOEXCEPT { __val_ = 0; __cat_ = &system_category(); } - _LIBCPP_ALWAYS_INLINE + _LIBCPP_INLINE_VISIBILITY int value() const _NOEXCEPT {return __val_;} - _LIBCPP_ALWAYS_INLINE + _LIBCPP_INLINE_VISIBILITY const error_category& category() const _NOEXCEPT {return *__cat_;} - _LIBCPP_ALWAYS_INLINE + _LIBCPP_INLINE_VISIBILITY error_condition default_error_condition() const _NOEXCEPT {return __cat_->default_error_condition(__val_);} string message() const; - _LIBCPP_ALWAYS_INLINE + _LIBCPP_INLINE_VISIBILITY _LIBCPP_EXPLICIT operator bool() const _NOEXCEPT {return __val_ != 0;} }; @@ -472,7 +472,7 @@ public: system_error(int __ev, const error_category& __ecat); ~system_error() _NOEXCEPT; - _LIBCPP_ALWAYS_INLINE + _LIBCPP_INLINE_VISIBILITY const error_code& code() const _NOEXCEPT {return __ec_;} private: |

