aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/cxxsupp
diff options
context:
space:
mode:
authororivej <orivej@yandex-team.ru>2022-02-10 16:44:49 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:44:49 +0300
commit718c552901d703c502ccbefdfc3c9028d608b947 (patch)
tree46534a98bbefcd7b1f3faa5b52c138ab27db75b7 /contrib/libs/cxxsupp
parente9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (diff)
downloadydb-718c552901d703c502ccbefdfc3c9028d608b947.tar.gz
Restoring authorship annotation for <orivej@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/cxxsupp')
-rw-r--r--contrib/libs/cxxsupp/builtins/muloti4.c2
-rw-r--r--contrib/libs/cxxsupp/builtins/os_version_check.c84
-rw-r--r--contrib/libs/cxxsupp/builtins/ya.make40
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/initializer_list10
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/tuple34
-rw-r--r--contrib/libs/cxxsupp/libcxxabi/ya.make2
-rw-r--r--contrib/libs/cxxsupp/libcxxrt/exception.cc16
-rw-r--r--contrib/libs/cxxsupp/libcxxrt/unwind.h2
-rw-r--r--contrib/libs/cxxsupp/libsan/inject.c8
9 files changed, 99 insertions, 99 deletions
diff --git a/contrib/libs/cxxsupp/builtins/muloti4.c b/contrib/libs/cxxsupp/builtins/muloti4.c
index aef8207aaa..1416a0fbd4 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 a3cb63886d..6df8ba3c5b 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 d2c319c927..a72eec50d3 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 89502392ab..e3420c5ee0 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 9b127953b3..12e856b5b2 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 29945e0e6d..36d0441485 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 6baf428ead..2755f20e66 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 cd163ddfdc..e074ed9cda 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 7790db5f36..cf2818a29b 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;
}