diff options
author | thegeorg <thegeorg@yandex-team.ru> | 2022-02-10 16:45:08 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:08 +0300 |
commit | 4e839db24a3bbc9f1c610c43d6faaaa99824dcca (patch) | |
tree | 506dac10f5df94fab310584ee51b24fc5a081c22 /util/system/compiler.h | |
parent | 2d37894b1b037cf24231090eda8589bbb44fb6fc (diff) | |
download | ydb-4e839db24a3bbc9f1c610c43d6faaaa99824dcca.tar.gz |
Restoring authorship annotation for <thegeorg@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/system/compiler.h')
-rw-r--r-- | util/system/compiler.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/util/system/compiler.h b/util/system/compiler.h index b373edcc46..70f316e171 100644 --- a/util/system/compiler.h +++ b/util/system/compiler.h @@ -158,9 +158,9 @@ #endif #ifdef __GNUC__ - #define Y_PACKED __attribute__((packed)) + #define Y_PACKED __attribute__((packed)) #else - #define Y_PACKED + #define Y_PACKED #endif #if defined(__GNUC__) @@ -262,7 +262,7 @@ _YandexAbort(); * } * @endcode */ -#if defined(__GNUC__) +#if defined(__GNUC__) #define Y_UNREACHABLE() __builtin_unreachable() #elif defined(_MSC_VER) #define Y_UNREACHABLE() __assume(false) @@ -626,21 +626,21 @@ _YandexAbort(); #ifdef __cplusplus -void UseCharPointerImpl(volatile const char*); +void UseCharPointerImpl(volatile const char*); -template <typename T> -Y_FORCE_INLINE void DoNotOptimizeAway(T&& datum) { +template <typename T> +Y_FORCE_INLINE void DoNotOptimizeAway(T&& datum) { #if defined(_MSC_VER) - UseCharPointerImpl(&reinterpret_cast<volatile const char&>(datum)); - _ReadWriteBarrier(); + UseCharPointerImpl(&reinterpret_cast<volatile const char&>(datum)); + _ReadWriteBarrier(); #elif defined(__GNUC__) && defined(_x86_) - asm volatile("" - : - : "X"(datum)); + asm volatile("" + : + : "X"(datum)); #else - Y_FAKE_READ(datum); + Y_FAKE_READ(datum); #endif -} +} /** * Use this macro to prevent unused variables elimination. |