summaryrefslogtreecommitdiff
path: root/lib/asan/asan_allocator.h
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2012-12-11 07:27:59 +0000
committerKostya Serebryany <kcc@google.com>2012-12-11 07:27:59 +0000
commit956ad47e14ba7a7935dc1ff2d96e02023acf8d4d (patch)
treea7af36b541c5b5926a5fc244d6e116a21c24f0fb /lib/asan/asan_allocator.h
parenta390ece58317a25ef26866cef6753df4b06a3e65 (diff)
[asan] fix the Windows build
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@169828 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/asan/asan_allocator.h')
-rw-r--r--lib/asan/asan_allocator.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/asan/asan_allocator.h b/lib/asan/asan_allocator.h
index 1e936c305..79de7fe3a 100644
--- a/lib/asan/asan_allocator.h
+++ b/lib/asan/asan_allocator.h
@@ -182,6 +182,9 @@ void asan_mz_force_lock();
void asan_mz_force_unlock();
// Log2 and RoundUpToPowerOfTwo should be inlined for performance.
+#if defined(_WIN32) && !defined(__clang__)
+#include <intrin.h>
+#endif
static inline uptr Log2(uptr x) {
CHECK(IsPowerOfTwo(x));