diff options
author | orivej <orivej@yandex-team.ru> | 2022-02-10 16:45:01 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:01 +0300 |
commit | 2d37894b1b037cf24231090eda8589bbb44fb6fc (patch) | |
tree | be835aa92c6248212e705f25388ebafcf84bc7a1 /contrib/libs/cxxsupp | |
parent | 718c552901d703c502ccbefdfc3c9028d608b947 (diff) | |
download | ydb-2d37894b1b037cf24231090eda8589bbb44fb6fc.tar.gz |
Restoring authorship annotation for <orivej@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/cxxsupp')
-rw-r--r-- | contrib/libs/cxxsupp/builtins/muloti4.c | 2 | ||||
-rw-r--r-- | contrib/libs/cxxsupp/builtins/os_version_check.c | 84 | ||||
-rw-r--r-- | contrib/libs/cxxsupp/builtins/ya.make | 40 | ||||
-rw-r--r-- | contrib/libs/cxxsupp/libcxx/include/initializer_list | 10 | ||||
-rw-r--r-- | contrib/libs/cxxsupp/libcxx/include/tuple | 34 | ||||
-rw-r--r-- | contrib/libs/cxxsupp/libcxxabi/ya.make | 2 | ||||
-rw-r--r-- | contrib/libs/cxxsupp/libcxxrt/exception.cc | 16 | ||||
-rw-r--r-- | contrib/libs/cxxsupp/libcxxrt/unwind.h | 2 | ||||
-rw-r--r-- | contrib/libs/cxxsupp/libsan/inject.c | 8 |
9 files changed, 99 insertions, 99 deletions
diff --git a/contrib/libs/cxxsupp/builtins/muloti4.c b/contrib/libs/cxxsupp/builtins/muloti4.c index 1416a0fbd4..aef8207aaa 100644 --- a/contrib/libs/cxxsupp/builtins/muloti4.c +++ b/contrib/libs/cxxsupp/builtins/muloti4.c @@ -20,7 +20,7 @@ /* Effects: sets *overflow to 1 if a * b overflows */ -__attribute__((no_sanitize("undefined"))) +__attribute__((no_sanitize("undefined"))) COMPILER_RT_ABI ti_int __muloti4(ti_int a, ti_int b, int* overflow) { diff --git a/contrib/libs/cxxsupp/builtins/os_version_check.c b/contrib/libs/cxxsupp/builtins/os_version_check.c index 6df8ba3c5b..a3cb63886d 100644 --- a/contrib/libs/cxxsupp/builtins/os_version_check.c +++ b/contrib/libs/cxxsupp/builtins/os_version_check.c @@ -27,19 +27,19 @@ static int32_t GlobalMajor, GlobalMinor, GlobalSubminor; static dispatch_once_t DispatchOnceCounter; -// _availability_version_check darwin API support. -typedef uint32_t dyld_platform_t; - -typedef struct { - dyld_platform_t platform; - uint32_t version; -} dyld_build_version_t; - -typedef bool (*AvailabilityVersionCheckFuncTy)(uint32_t count, - dyld_build_version_t versions[]); - -static AvailabilityVersionCheckFuncTy AvailabilityVersionCheck; - +// _availability_version_check darwin API support. +typedef uint32_t dyld_platform_t; + +typedef struct { + dyld_platform_t platform; + uint32_t version; +} dyld_build_version_t; + +typedef bool (*AvailabilityVersionCheckFuncTy)(uint32_t count, + dyld_build_version_t versions[]); + +static AvailabilityVersionCheckFuncTy AvailabilityVersionCheck; + /* We can't include <CoreFoundation/CoreFoundation.h> directly from here, so * just forward declare everything that we need from it. */ @@ -88,15 +88,15 @@ typedef Boolean (*CFStringGetCStringFuncTy)(CFStringRef, char *, CFIndex, typedef void (*CFReleaseFuncTy)(CFTypeRef); /* Find and parse the SystemVersion.plist file. */ -static void initializeAvailabilityCheck(void *Unused) { +static void initializeAvailabilityCheck(void *Unused) { (void)Unused; - - // Use the new API if it's is available. Still load the PLIST to ensure that the - // existing calls to __isOSVersionAtLeast still work even with new - // compiler-rt and new OSes. - AvailabilityVersionCheck = (AvailabilityVersionCheckFuncTy)dlsym( - RTLD_DEFAULT, "_availability_version_check"); - + + // Use the new API if it's is available. Still load the PLIST to ensure that the + // existing calls to __isOSVersionAtLeast still work even with new + // compiler-rt and new OSes. + AvailabilityVersionCheck = (AvailabilityVersionCheckFuncTy)dlsym( + RTLD_DEFAULT, "_availability_version_check"); + /* Load CoreFoundation dynamically */ const void *NullAllocator = dlsym(RTLD_DEFAULT, "kCFAllocatorNull"); if (!NullAllocator) @@ -223,12 +223,12 @@ Fail: fclose(PropertyList); } -// This old API entry point is no longer used by Clang. We still need to keep it -// around to ensure that object files that reference it are still usable when -// linked with new compiler-rt. +// This old API entry point is no longer used by Clang. We still need to keep it +// around to ensure that object files that reference it are still usable when +// linked with new compiler-rt. int32_t __isOSVersionAtLeast(int32_t Major, int32_t Minor, int32_t Subminor) { /* Populate the global version variables, if they haven't already. */ - dispatch_once_f(&DispatchOnceCounter, NULL, initializeAvailabilityCheck); + dispatch_once_f(&DispatchOnceCounter, NULL, initializeAvailabilityCheck); if (Major < GlobalMajor) return 1; @@ -241,23 +241,23 @@ int32_t __isOSVersionAtLeast(int32_t Major, int32_t Minor, int32_t Subminor) { return Subminor <= GlobalSubminor; } -static inline uint32_t ConstructVersion(uint32_t Major, uint32_t Minor, - uint32_t Subminor) { - return ((Major & 0xffff) << 16) | ((Minor & 0xff) << 8) | (Subminor & 0xff); -} - -int32_t __isPlatformVersionAtLeast(uint32_t Platform, uint32_t Major, - uint32_t Minor, uint32_t Subminor) { - dispatch_once_f(&DispatchOnceCounter, NULL, initializeAvailabilityCheck); - - if (!AvailabilityVersionCheck) { - return __isOSVersionAtLeast(Major, Minor, Subminor); - } - dyld_build_version_t Versions[] = { - {Platform, ConstructVersion(Major, Minor, Subminor)}}; - return AvailabilityVersionCheck(1, Versions); -} - +static inline uint32_t ConstructVersion(uint32_t Major, uint32_t Minor, + uint32_t Subminor) { + return ((Major & 0xffff) << 16) | ((Minor & 0xff) << 8) | (Subminor & 0xff); +} + +int32_t __isPlatformVersionAtLeast(uint32_t Platform, uint32_t Major, + uint32_t Minor, uint32_t Subminor) { + dispatch_once_f(&DispatchOnceCounter, NULL, initializeAvailabilityCheck); + + if (!AvailabilityVersionCheck) { + return __isOSVersionAtLeast(Major, Minor, Subminor); + } + dyld_build_version_t Versions[] = { + {Platform, ConstructVersion(Major, Minor, Subminor)}}; + return AvailabilityVersionCheck(1, Versions); +} + #else /* Silence an empty translation unit warning. */ diff --git a/contrib/libs/cxxsupp/builtins/ya.make b/contrib/libs/cxxsupp/builtins/ya.make index a72eec50d3..d2c319c927 100644 --- a/contrib/libs/cxxsupp/builtins/ya.make +++ b/contrib/libs/cxxsupp/builtins/ya.make @@ -29,20 +29,20 @@ OWNER( g:cpp-contrib ) -# Check MUSL before NO_PLATFORM() disables it. -IF (MUSL) - # We use C headers despite NO_PLATFORM, but we do not propagate - # them with ADDINCL GLOBAL because we do not have an API, and we - # can not propagate them because libcxx has to put its own - # includes before musl includes for its include_next to work. - ADDINCL( - contrib/libs/musl/arch/x86_64 - contrib/libs/musl/arch/generic - contrib/libs/musl/include - contrib/libs/musl/extra - ) -ENDIF() - +# Check MUSL before NO_PLATFORM() disables it. +IF (MUSL) + # We use C headers despite NO_PLATFORM, but we do not propagate + # them with ADDINCL GLOBAL because we do not have an API, and we + # can not propagate them because libcxx has to put its own + # includes before musl includes for its include_next to work. + ADDINCL( + contrib/libs/musl/arch/x86_64 + contrib/libs/musl/arch/generic + contrib/libs/musl/include + contrib/libs/musl/extra + ) +ENDIF() + NO_UTIL() NO_RUNTIME() @@ -64,7 +64,7 @@ ENDIF() SRCS( addtf3.c - ashlti3.c + ashlti3.c clzti2.c comparetf2.c divdc3.c @@ -78,9 +78,9 @@ SRCS( fixsfti.c fixtfdi.c fixtfsi.c - fixunsdfti.c - fixunssfti.c - fixunstfdi.c + fixunsdfti.c + fixunssfti.c + fixunstfdi.c fixunstfsi.c fixunstfti.c fixunsxfti.c @@ -90,11 +90,11 @@ SRCS( floattisf.c floatunditf.c floatunsitf.c - floatuntidf.c + floatuntidf.c floatuntisf.c gcc_personality_v0.c int_util.c - lshrti3.c + lshrti3.c modti3.c muldc3.c muloti4.c diff --git a/contrib/libs/cxxsupp/libcxx/include/initializer_list b/contrib/libs/cxxsupp/libcxx/include/initializer_list index e3420c5ee0..89502392ab 100644 --- a/contrib/libs/cxxsupp/libcxx/include/initializer_list +++ b/contrib/libs/cxxsupp/libcxx/include/initializer_list @@ -86,11 +86,11 @@ public: _LIBCPP_CONSTEXPR_AFTER_CXX11 initializer_list() _NOEXCEPT : __begin_(nullptr), __size_(0) {} - initializer_list(const initializer_list&) = default; - initializer_list(initializer_list&&) = default; - initializer_list& operator=(const initializer_list&) = delete; - initializer_list& operator=(initializer_list&&) = delete; - + initializer_list(const initializer_list&) = default; + initializer_list(initializer_list&&) = default; + initializer_list& operator=(const initializer_list&) = delete; + initializer_list& operator=(initializer_list&&) = delete; + _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 size_t size() const _NOEXCEPT {return __size_;} diff --git a/contrib/libs/cxxsupp/libcxx/include/tuple b/contrib/libs/cxxsupp/libcxx/include/tuple index 12e856b5b2..9b127953b3 100644 --- a/contrib/libs/cxxsupp/libcxx/include/tuple +++ b/contrib/libs/cxxsupp/libcxx/include/tuple @@ -382,23 +382,23 @@ struct _LIBCPP_DECLSPEC_EMPTY_BASES __tuple_impl<__tuple_indices<_Indx...>, _Tp. __tuple_leaf<_Ul, _Tl>()... {} -#if defined(__NVCC__) && defined(_LIBCPP_COMPILER_MSVC) - // Yandex-specific: specialize the preceding constructor for the - // case of empty _Ul and _Tl to work around nvcc+msvc bug - // compiling libcxx std::map<int, int> m; m[1] = 2. - template <size_t ..._Uf, class ..._Tf, - class ..._Up> - _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 - explicit - __tuple_impl(__tuple_indices<_Uf...>, __tuple_types<_Tf...>, - __tuple_indices<>, __tuple_types<>, - _Up&&... __u) - _NOEXCEPT_((__all<is_nothrow_constructible<_Tf, _Up>::value...>::value)) : - __tuple_leaf<_Uf, _Tf>(_VSTD::forward<_Up>(__u))... - {} - // End of Yandex-specific -#endif - +#if defined(__NVCC__) && defined(_LIBCPP_COMPILER_MSVC) + // Yandex-specific: specialize the preceding constructor for the + // case of empty _Ul and _Tl to work around nvcc+msvc bug + // compiling libcxx std::map<int, int> m; m[1] = 2. + template <size_t ..._Uf, class ..._Tf, + class ..._Up> + _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 + explicit + __tuple_impl(__tuple_indices<_Uf...>, __tuple_types<_Tf...>, + __tuple_indices<>, __tuple_types<>, + _Up&&... __u) + _NOEXCEPT_((__all<is_nothrow_constructible<_Tf, _Up>::value...>::value)) : + __tuple_leaf<_Uf, _Tf>(_VSTD::forward<_Up>(__u))... + {} + // End of Yandex-specific +#endif + template <class _Alloc, size_t ..._Uf, class ..._Tf, size_t ..._Ul, class ..._Tl, class ..._Up> _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 diff --git a/contrib/libs/cxxsupp/libcxxabi/ya.make b/contrib/libs/cxxsupp/libcxxabi/ya.make index 36d0441485..29945e0e6d 100644 --- a/contrib/libs/cxxsupp/libcxxabi/ya.make +++ b/contrib/libs/cxxsupp/libcxxabi/ya.make @@ -11,7 +11,7 @@ OWNER( VERSION(2021-12-08) ORIGINAL_SOURCE(https://github.com/llvm/llvm-project/archive/c1a14a5c3e6fef181f920b66ec159b6bfac4d457.tar.gz) - + LICENSE( Apache-2.0 AND Apache-2.0 WITH LLVM-exception AND diff --git a/contrib/libs/cxxsupp/libcxxrt/exception.cc b/contrib/libs/cxxsupp/libcxxrt/exception.cc index 2755f20e66..6baf428ead 100644 --- a/contrib/libs/cxxsupp/libcxxrt/exception.cc +++ b/contrib/libs/cxxsupp/libcxxrt/exception.cc @@ -1621,15 +1621,15 @@ namespace std return info->globals.uncaughtExceptions != 0; } /** - * Returns the number of exceptions currently being thrown that have not - * been caught. This can occur inside a nested catch statement. - */ + * Returns the number of exceptions currently being thrown that have not + * been caught. This can occur inside a nested catch statement. + */ int uncaught_exceptions() noexcept - { - __cxa_thread_info *info = thread_info(); - return info->globals.uncaughtExceptions; - } - /** + { + __cxa_thread_info *info = thread_info(); + return info->globals.uncaughtExceptions; + } + /** * Returns the current unexpected handler. */ unexpected_handler get_unexpected() noexcept diff --git a/contrib/libs/cxxsupp/libcxxrt/unwind.h b/contrib/libs/cxxsupp/libcxxrt/unwind.h index e074ed9cda..cd163ddfdc 100644 --- a/contrib/libs/cxxsupp/libcxxrt/unwind.h +++ b/contrib/libs/cxxsupp/libcxxrt/unwind.h @@ -1,6 +1,6 @@ #pragma once -#include <contrib/libs/libunwind/include/unwind.h> +#include <contrib/libs/libunwind/include/unwind.h> #define DECLARE_PERSONALITY_FUNCTION(name) \ _Unwind_Reason_Code name(int version,\ diff --git a/contrib/libs/cxxsupp/libsan/inject.c b/contrib/libs/cxxsupp/libsan/inject.c index cf2818a29b..7790db5f36 100644 --- a/contrib/libs/cxxsupp/libsan/inject.c +++ b/contrib/libs/cxxsupp/libsan/inject.c @@ -1,8 +1,8 @@ -#include <unistd.h> - +#include <unistd.h> + extern const char* ya_get_symbolizer_gen(); const char* ya_get_symbolizer() { - const char* path = ya_get_symbolizer_gen(); - return access(path, X_OK) ? NULL : path; + const char* path = ya_get_symbolizer_gen(); + return access(path, X_OK) ? NULL : path; } |