diff options
author | Kostya Serebryany <kcc@google.com> | 2012-11-21 12:38:58 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2012-11-21 12:38:58 +0000 |
commit | 5af39e50366f1aacbebc284f572f08ad1ad07357 (patch) | |
tree | 0db8df8b9a6f75e87bb8acd8a73705dc408662c9 /lib/asan/asan_allocator.cc | |
parent | dc2a27ecd65079f1916f5ab53ec646f9a9e61349 (diff) |
[asan/tsan] do not use __WORDSIZE macro, as it is glibc-private thing. Instead, define our own SANITIZER_WORDSIZE
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168424 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/asan/asan_allocator.cc')
-rw-r--r-- | lib/asan/asan_allocator.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/asan/asan_allocator.cc b/lib/asan/asan_allocator.cc index de3713756..b570f0d98 100644 --- a/lib/asan/asan_allocator.cc +++ b/lib/asan/asan_allocator.cc @@ -58,7 +58,7 @@ static const uptr kMallocSizeClassStepLog = 26; static const uptr kMallocSizeClassStep = 1UL << kMallocSizeClassStepLog; static const uptr kMaxAllowedMallocSize = - (__WORDSIZE == 32) ? 3UL << 30 : 8UL << 30; + (SANITIZER_WORDSIZE == 32) ? 3UL << 30 : 8UL << 30; static inline bool IsAligned(uptr a, uptr alignment) { return (a & (alignment - 1)) == 0; @@ -85,7 +85,7 @@ static inline uptr RoundUpToPowerOfTwo(uptr size) { unsigned long up; // NOLINT #if !defined(_WIN32) || defined(__clang__) - up = __WORDSIZE - 1 - __builtin_clzl(size); + up = SANITIZER_WORDSIZE - 1 - __builtin_clzl(size); #elif defined(_WIN64) _BitScanReverse64(&up, size); #else |