diff options
author | Mitch Phillips <31459023+hctim@users.noreply.github.com> | 2022-05-19 00:04:04 +0300 |
---|---|---|
committer | Mitch Phillips <31459023+hctim@users.noreply.github.com> | 2022-05-19 00:04:04 +0300 |
commit | e831ea6912d16a0afc270b35ba15a1535199fe41 (patch) | |
tree | d713ef2ad3876916ae98dfd0dbdb85af237f9947 /compiler-rt | |
parent | 7aa1fa0a0a07f7949d2d77c099aab43cf9b75a91 (diff) |
[NFCI] clang-format scudo standalone
Diffstat (limited to 'compiler-rt')
-rw-r--r-- | compiler-rt/lib/scudo/standalone/checksum.h | 3 | ||||
-rw-r--r-- | compiler-rt/lib/scudo/standalone/chunk.h | 3 | ||||
-rw-r--r-- | compiler-rt/lib/scudo/standalone/crc32_hw.cpp | 3 | ||||
-rw-r--r-- | compiler-rt/lib/scudo/standalone/tests/tsd_test.cpp | 4 | ||||
-rw-r--r-- | compiler-rt/lib/scudo/standalone/wrappers_cpp.cpp | 14 |
5 files changed, 17 insertions, 10 deletions
diff --git a/compiler-rt/lib/scudo/standalone/checksum.h b/compiler-rt/lib/scudo/standalone/checksum.h index 0f787ce2b5cd..f8eda81fd912 100644 --- a/compiler-rt/lib/scudo/standalone/checksum.h +++ b/compiler-rt/lib/scudo/standalone/checksum.h @@ -20,7 +20,8 @@ #if defined(__CRC32__) // NB: clang has <crc32intrin.h> but GCC does not #include <smmintrin.h> -#define CRC32_INTRINSIC FIRST_32_SECOND_64(__builtin_ia32_crc32si, __builtin_ia32_crc32di) +#define CRC32_INTRINSIC \ + FIRST_32_SECOND_64(__builtin_ia32_crc32si, __builtin_ia32_crc32di) #elif defined(__SSE4_2__) #include <smmintrin.h> #define CRC32_INTRINSIC FIRST_32_SECOND_64(_mm_crc32_u32, _mm_crc32_u64) diff --git a/compiler-rt/lib/scudo/standalone/chunk.h b/compiler-rt/lib/scudo/standalone/chunk.h index 0581420dfc99..88bada8c2d19 100644 --- a/compiler-rt/lib/scudo/standalone/chunk.h +++ b/compiler-rt/lib/scudo/standalone/chunk.h @@ -42,7 +42,8 @@ inline u16 computeChecksum(u32 Seed, uptr Value, uptr *Array, uptr ArraySize) { Checksum = computeBSDChecksum(Checksum, Array[I]); return Checksum; } -#endif // defined(__CRC32__) || defined(__SSE4_2__) || defined(__ARM_FEATURE_CRC32) +#endif // defined(__CRC32__) || defined(__SSE4_2__) || + // defined(__ARM_FEATURE_CRC32) } namespace Chunk { diff --git a/compiler-rt/lib/scudo/standalone/crc32_hw.cpp b/compiler-rt/lib/scudo/standalone/crc32_hw.cpp index d13c615498ff..73f2ae000c63 100644 --- a/compiler-rt/lib/scudo/standalone/crc32_hw.cpp +++ b/compiler-rt/lib/scudo/standalone/crc32_hw.cpp @@ -14,6 +14,7 @@ namespace scudo { u32 computeHardwareCRC32(u32 Crc, uptr Data) { return static_cast<u32>(CRC32_INTRINSIC(Crc, Data)); } -#endif // defined(__CRC32__) || defined(__SSE4_2__) || defined(__ARM_FEATURE_CRC32) +#endif // defined(__CRC32__) || defined(__SSE4_2__) || + // defined(__ARM_FEATURE_CRC32) } // namespace scudo diff --git a/compiler-rt/lib/scudo/standalone/tests/tsd_test.cpp b/compiler-rt/lib/scudo/standalone/tests/tsd_test.cpp index 17387ee7c570..6c0c86d4e78b 100644 --- a/compiler-rt/lib/scudo/standalone/tests/tsd_test.cpp +++ b/compiler-rt/lib/scudo/standalone/tests/tsd_test.cpp @@ -25,7 +25,9 @@ template <class Config> class MockAllocator { public: using ThisT = MockAllocator<Config>; using TSDRegistryT = typename Config::template TSDRegistryT<ThisT>; - using CacheT = struct MockCache { volatile scudo::uptr Canary; }; + using CacheT = struct MockCache { + volatile scudo::uptr Canary; + }; using QuarantineCacheT = struct MockQuarantine {}; void init() { diff --git a/compiler-rt/lib/scudo/standalone/wrappers_cpp.cpp b/compiler-rt/lib/scudo/standalone/wrappers_cpp.cpp index 16f495b6a353..374e36d72b3d 100644 --- a/compiler-rt/lib/scudo/standalone/wrappers_cpp.cpp +++ b/compiler-rt/lib/scudo/standalone/wrappers_cpp.cpp @@ -54,26 +54,28 @@ INTERFACE WEAK void *operator new[](size_t size, std::align_val_t align, static_cast<scudo::uptr>(align)); } -INTERFACE WEAK void operator delete(void *ptr)NOEXCEPT { +INTERFACE WEAK void operator delete(void *ptr) NOEXCEPT { Allocator.deallocate(ptr, scudo::Chunk::Origin::New); } INTERFACE WEAK void operator delete[](void *ptr) NOEXCEPT { Allocator.deallocate(ptr, scudo::Chunk::Origin::NewArray); } -INTERFACE WEAK void operator delete(void *ptr, std::nothrow_t const &)NOEXCEPT { +INTERFACE WEAK void operator delete(void *ptr, + std::nothrow_t const &) NOEXCEPT { Allocator.deallocate(ptr, scudo::Chunk::Origin::New); } INTERFACE WEAK void operator delete[](void *ptr, std::nothrow_t const &) NOEXCEPT { Allocator.deallocate(ptr, scudo::Chunk::Origin::NewArray); } -INTERFACE WEAK void operator delete(void *ptr, size_t size)NOEXCEPT { +INTERFACE WEAK void operator delete(void *ptr, size_t size) NOEXCEPT { Allocator.deallocate(ptr, scudo::Chunk::Origin::New, size); } INTERFACE WEAK void operator delete[](void *ptr, size_t size) NOEXCEPT { Allocator.deallocate(ptr, scudo::Chunk::Origin::NewArray, size); } -INTERFACE WEAK void operator delete(void *ptr, std::align_val_t align)NOEXCEPT { +INTERFACE WEAK void operator delete(void *ptr, + std::align_val_t align) NOEXCEPT { Allocator.deallocate(ptr, scudo::Chunk::Origin::New, 0, static_cast<scudo::uptr>(align)); } @@ -83,7 +85,7 @@ INTERFACE WEAK void operator delete[](void *ptr, static_cast<scudo::uptr>(align)); } INTERFACE WEAK void operator delete(void *ptr, std::align_val_t align, - std::nothrow_t const &)NOEXCEPT { + std::nothrow_t const &) NOEXCEPT { Allocator.deallocate(ptr, scudo::Chunk::Origin::New, 0, static_cast<scudo::uptr>(align)); } @@ -93,7 +95,7 @@ INTERFACE WEAK void operator delete[](void *ptr, std::align_val_t align, static_cast<scudo::uptr>(align)); } INTERFACE WEAK void operator delete(void *ptr, size_t size, - std::align_val_t align)NOEXCEPT { + std::align_val_t align) NOEXCEPT { Allocator.deallocate(ptr, scudo::Chunk::Origin::New, size, static_cast<scudo::uptr>(align)); } |