diff --git a/compiler-rt/lib/sanitizer_common/CMakeLists.txt b/compiler-rt/lib/sanitizer_common/CMakeLists.txt index 64a7bc49c792..f4e768f1a629 100644 --- a/compiler-rt/lib/sanitizer_common/CMakeLists.txt +++ b/compiler-rt/lib/sanitizer_common/CMakeLists.txt @@ -38,6 +38,7 @@ set(SANITIZER_SOURCES_NOTERMINATION sanitizer_suppressions.cc sanitizer_tls_get_addr.cc sanitizer_thread_registry.cc + sanitizer_type_traits.cc sanitizer_win.cc) if(UNIX AND NOT APPLE AND NOT OS_NAME MATCHES "SunOS") diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_type_traits.cc b/compiler-rt/lib/sanitizer_common/sanitizer_type_traits.cc new file mode 100644 index 000000000000..27fec6e1f494 --- /dev/null +++ b/compiler-rt/lib/sanitizer_common/sanitizer_type_traits.cc @@ -0,0 +1,21 @@ +//===-- sanitizer_type_traits.cc --------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// Implements a subset of C++ type traits. This is so we can avoid depending +// on system C++ headers. +// +//===----------------------------------------------------------------------===// +#include "sanitizer_type_traits.h" + +namespace __sanitizer { + +const bool true_type::value; +const bool false_type::value; + +} // namespace __sanitizer