3333// the functions to be emitted and included in the library. When users of libc++
3434// compile their code, the __gnu_inline__ attribute will suppress generation of
3535// these functions while making their definitions available for inlining.
36- # ifdef _LIBCPP_EMIT_CODE_FOR_EXCEPTION_PTR
37- # define _LIBCPP_EXPORTED_FROM_LIB_INLINEABLE _LIBCPP_EXPORTED_FROM_ABI
38- # else
39- # if !__has_cpp_attribute(gnu::gnu_inline)
40- # error "GNU inline attribute is not supported"
41- # endif
42- # define _LIBCPP_EXPORTED_FROM_LIB_INLINEABLE [[gnu::gnu_inline]] inline
36+ #ifdef _LIBCPP_EMIT_CODE_FOR_EXCEPTION_PTR
37+ # define _LIBCPP_EXPORTED_FROM_LIB_INLINEABLE _LIBCPP_EXPORTED_FROM_ABI
38+ #else
39+ # if !__has_cpp_attribute(gnu::gnu_inline)
40+ # error "GNU inline attribute is not supported"
4341# endif
42+ # define _LIBCPP_EXPORTED_FROM_LIB_INLINEABLE [[gnu::gnu_inline]] inline
43+ #endif
4444
4545_LIBCPP_DIAGNOSTIC_PUSH
4646_LIBCPP_CLANG_DIAGNOSTIC_IGNORED (" -Wgnu-inline-cpp-without-extern" )
@@ -119,8 +119,8 @@ class _LIBCPP_EXPORTED_FROM_ABI exception_ptr {
119119
120120 friend _LIBCPP_HIDE_FROM_ABI void swap (exception_ptr& __x, exception_ptr& __y) {
121121 void * __tmp = __x.__ptr_ ;
122- __x.__ptr_ = __y.__ptr_ ;
123- __y.__ptr_ = __tmp;
122+ __x.__ptr_ = __y.__ptr_ ;
123+ __y.__ptr_ = __tmp;
124124 }
125125
126126 friend _LIBCPP_EXPORTED_FROM_ABI exception_ptr current_exception () _NOEXCEPT;
@@ -136,7 +136,8 @@ _LIBCPP_EXPORTED_FROM_LIB_INLINEABLE exception_ptr exception_ptr::__from_native_
136136}
137137
138138// Must be defined outside the class definition due to _LIBCPP_EXPORTED_FROM_LIB_INLINEABLE
139- _LIBCPP_EXPORTED_FROM_LIB_INLINEABLE exception_ptr::exception_ptr (const exception_ptr& __other) noexcept : __ptr_(__other.__ptr_) {
139+ _LIBCPP_EXPORTED_FROM_LIB_INLINEABLE exception_ptr::exception_ptr (const exception_ptr& __other) noexcept
140+ : __ptr_(__other.__ptr_) {
140141 __increment_refcount (__ptr_);
141142}
142143
@@ -156,7 +157,7 @@ _LIBCPP_EXPORTED_FROM_LIB_INLINEABLE exception_ptr& exception_ptr::operator=(con
156157
157158_LIBCPP_HIDE_FROM_ABI inline exception_ptr& exception_ptr::operator =(exception_ptr&& __other) noexcept {
158159 __decrement_refcount (__ptr_);
159- __ptr_ = __other.__ptr_ ;
160+ __ptr_ = __other.__ptr_ ;
160161 __other.__ptr_ = nullptr ;
161162 return *this ;
162163}
@@ -274,17 +275,17 @@ _LIBCPP_HIDE_FROM_ABI exception_ptr make_exception_ptr(_Ep __e) _NOEXCEPT {
274275
275276_LIBCPP_END_UNVERSIONED_NAMESPACE_STD
276277
277- # if defined(_LIBCPP_CXX_ABI_NONE)
278- # include < __exception/exception_ptr_unimplemented.ipp>
279- # elif defined(_LIBCPP_CXX_ABI_LIBCXXABI) || defined(_LIBCPP_CXX_ABI_LIBCXXRT)
280- # include < __exception/exception_ptr_cxxabi.ipp>
281- # elif defined(_LIBCPP_CXX_ABI_LIBSTDCXX) || defined(_LIBCPP_CXX_ABI_LIBSUPCXX)
282- # include < __exception/exception_ptr_glibcxx.ipp>
283- # elif defined(_LIBCPP_CXX_ABI_VCRUNTIME)
284- # include < __exception/exception_ptr_msvc.ipp>
285- # else
286- # error "Unsupported C++ ABI library"
287- # endif
278+ #if defined(_LIBCPP_CXX_ABI_NONE)
279+ # include < __exception/exception_ptr_unimplemented.ipp>
280+ #elif defined(_LIBCPP_CXX_ABI_LIBCXXABI) || defined(_LIBCPP_CXX_ABI_LIBCXXRT)
281+ # include < __exception/exception_ptr_cxxabi.ipp>
282+ #elif defined(_LIBCPP_CXX_ABI_LIBSTDCXX) || defined(_LIBCPP_CXX_ABI_LIBSUPCXX)
283+ # include < __exception/exception_ptr_glibcxx.ipp>
284+ #elif defined(_LIBCPP_CXX_ABI_VCRUNTIME)
285+ # include < __exception/exception_ptr_msvc.ipp>
286+ #else
287+ # error "Unsupported C++ ABI library"
288+ #endif
288289
289290_LIBCPP_DIAGNOSTIC_POP
290291
0 commit comments