[asan] fix the Windows build
authorKostya Serebryany <kcc@google.com>
Tue, 11 Dec 2012 07:27:59 +0000 (07:27 +0000)
committerKostya Serebryany <kcc@google.com>
Tue, 11 Dec 2012 07:27:59 +0000 (07:27 +0000)
llvm-svn: 169828

compiler-rt/lib/asan/asan_allocator.cc
compiler-rt/lib/asan/asan_allocator.h

index 4d422a7..8a37c8d 100644 (file)
 #include "sanitizer/asan_interface.h"
 #include "sanitizer_common/sanitizer_atomic.h"
 
-#if defined(_WIN32) && !defined(__clang__)
-#include <intrin.h>
-#endif
-
 namespace __asan {
 
 #define REDZONE ((uptr)(flags()->redzone))
index 1e936c3..79de7fe 100644 (file)
@@ -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));