Unconditionally include msan_interface.h when building with MSan.
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Thu, 20 Feb 2014 11:37:03 +0000 (11:37 +0000)
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Thu, 20 Feb 2014 11:37:03 +0000 (11:37 +0000)
Any version of Clang that does not provide this header is way too old to
bootstrap with MSan.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201776 91177308-0d34-0410-b5e6-96231b3b80d8

cmake/config-ix.cmake
include/llvm/Config/llvm-config.h.cmake
include/llvm/Support/Compiler.h

index 93aeae1003206ef99635e92b4d6bf6ed71272f97..5b945d1220994287e13d31122f1b3db32a6d742d 100755 (executable)
@@ -51,7 +51,6 @@ check_include_file(ndir.h HAVE_NDIR_H)
 if( NOT PURE_WINDOWS )
   check_include_file(pthread.h HAVE_PTHREAD_H)
 endif()
-check_include_file(sanitizer/msan_interface.h HAVE_SANITIZER_MSAN_INTERFACE_H)
 check_include_file(signal.h HAVE_SIGNAL_H)
 check_include_file(stdint.h HAVE_STDINT_H)
 check_include_file(sys/dir.h HAVE_SYS_DIR_H)
index 80616ef9508c79c14355643b7550871972efd01f..2b828a1ffb07a592e4fe28d0dddf4794c8a12c1e 100644 (file)
 /* Minor version of the LLVM API */
 #cmakedefine LLVM_VERSION_MINOR ${LLVM_VERSION_MINOR}
 
-/* Define to 1 if you have the <sanitizer/msan_interface.h> header file. */
-#cmakedefine HAVE_SANITIZER_MSAN_INTERFACE_H ${HAVE_SANITIZER_MSAN_INTERFACE_H}
-
 #endif
index 49f299543498ce8083de224fc58af40e50e4ceeb..d7621a0513bbd11f68c0686bcc37056db919ebed 100644 (file)
 # define LLVM_FUNCTION_NAME __func__
 #endif
 
-#if defined(HAVE_SANITIZER_MSAN_INTERFACE_H)
-# include <sanitizer/msan_interface.h>
-#else
-# define __msan_allocated_memory(p, size)
-# define __msan_unpoison(p, size)
-#endif
-
 /// \macro LLVM_MEMORY_SANITIZER_BUILD
 /// \brief Whether LLVM itself is built with MemorySanitizer instrumentation.
 #if __has_feature(memory_sanitizer)
 # define LLVM_MEMORY_SANITIZER_BUILD 1
+# include <sanitizer/msan_interface.h>
 #else
 # define LLVM_MEMORY_SANITIZER_BUILD 0
+# define __msan_allocated_memory(p, size)
+# define __msan_unpoison(p, size)
 #endif
 
 /// \macro LLVM_ADDRESS_SANITIZER_BUILD