diff options
author | Alexey Samsonov <samsonov@google.com> | 2012-09-11 12:19:18 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2012-09-11 12:19:18 +0000 |
commit | 100150f59df15140280f198cf0497c4c4f80fd8b (patch) | |
tree | ea9c00cdf5f2084c41f7ffa5c255fa84c65356c7 /compiler-rt/lib/sanitizer_common | |
parent | ab7a4ea48573d521bd4948f48b3d3837d272e680 (diff) | |
download | bcm5719-llvm-100150f59df15140280f198cf0497c4c4f80fd8b.tar.gz bcm5719-llvm-100150f59df15140280f198cf0497c4c4f80fd8b.zip |
[Sanitizer] test 64-bit allocator only on suitable targets
llvm-svn: 163615
Diffstat (limited to 'compiler-rt/lib/sanitizer_common')
-rw-r--r-- | compiler-rt/lib/sanitizer_common/sanitizer_allocator64.h | 6 | ||||
-rw-r--r-- | compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_allocator64.h b/compiler-rt/lib/sanitizer_common/sanitizer_allocator64.h index c6abd1e6cbc..093c76b8f11 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_allocator64.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_allocator64.h @@ -17,8 +17,12 @@ #ifndef SANITIZER_ALLOCATOR_H #define SANITIZER_ALLOCATOR_H -#include "sanitizer_common.h" #include "sanitizer_internal_defs.h" +#if __WORDSIZE != 64 +# error "sanitizer_allocator64.h can only be used on 64-bit platforms" +#endif + +#include "sanitizer_common.h" #include "sanitizer_libc.h" #include "sanitizer_list.h" #include "sanitizer_mutex.h" diff --git a/compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt b/compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt index 83837014deb..a4c4707af0d 100644 --- a/compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt +++ b/compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt @@ -1,5 +1,4 @@ set(SANITIZER_UNITTESTS - sanitizer_allocator64_test.cc sanitizer_allocator_test.cc sanitizer_common_test.cc sanitizer_flags_test.cc @@ -7,6 +6,9 @@ set(SANITIZER_UNITTESTS sanitizer_stackdepot_test.cc sanitizer_test_main.cc ) +if(CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT LLVM_BUILD_32_BITS) + list(APPEND SANITIZER_UNITTESTS sanitizer_allocator64_test.cc) +endif() include_directories(..) include_directories(../..) |