Index: compiler-rt/trunk/lib/lsan/CMakeLists.txt =================================================================== --- compiler-rt/trunk/lib/lsan/CMakeLists.txt +++ compiler-rt/trunk/lib/lsan/CMakeLists.txt @@ -5,7 +5,8 @@ set(LSAN_COMMON_SOURCES lsan_common.cc - lsan_common_linux.cc) + lsan_common_linux.cc + lsan_common_mac.cc) set(LSAN_SOURCES lsan.cc Index: compiler-rt/trunk/lib/lsan/lsan_common_mac.cc =================================================================== --- compiler-rt/trunk/lib/lsan/lsan_common_mac.cc +++ compiler-rt/trunk/lib/lsan/lsan_common_mac.cc @@ -0,0 +1,40 @@ +//=-- lsan_common_mac.cc --------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file is a part of LeakSanitizer. +// Implementation of common leak checking functionality. Darwin-specific code. +// +//===----------------------------------------------------------------------===// + +#include "sanitizer_common/sanitizer_platform.h" +#include "lsan_common.h" + +#if CAN_SANITIZE_LEAKS && SANITIZER_MAC +namespace __lsan { + +void InitializePlatformSpecificModules() { + CHECK(0 && "unimplemented"); +} + +// Scans global variables for heap pointers. +void ProcessGlobalRegions(Frontier *frontier) { + CHECK(0 && "unimplemented"); +} + +void ProcessPlatformSpecificAllocations(Frontier *frontier) { + CHECK(0 && "unimplemented"); +} + +void DoStopTheWorld(StopTheWorldCallback callback, void *argument) { + CHECK(0 && "unimplemented"); +} + +} // namespace __lsan + +#endif // CAN_SANITIZE_LEAKS && SANITIZER_MAC Index: compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt =================================================================== --- compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt +++ compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt @@ -25,6 +25,7 @@ sanitizer_stackdepot.cc sanitizer_stacktrace.cc sanitizer_stacktrace_printer.cc + sanitizer_stoptheworld_mac.cc sanitizer_suppressions.cc sanitizer_symbolizer.cc sanitizer_symbolizer_libbacktrace.cc Index: compiler-rt/trunk/lib/sanitizer_common/sanitizer_stoptheworld_mac.cc =================================================================== --- compiler-rt/trunk/lib/sanitizer_common/sanitizer_stoptheworld_mac.cc +++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_stoptheworld_mac.cc @@ -0,0 +1,38 @@ +//===-- sanitizer_stoptheworld_mac.cc -------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// See sanitizer_stoptheworld.h for details. +// +//===----------------------------------------------------------------------===// + +#include "sanitizer_platform.h" + +#if SANITIZER_MAC && (defined(__x86_64__) || defined(__aarch64__)) + +#include "sanitizer_stoptheworld.h" + +namespace __sanitizer { +void StopTheWorld(StopTheWorldCallback callback, void *argument) { + CHECK(0 && "unimplemented"); +} + +int SuspendedThreadsList::GetRegistersAndSP(uptr index, + uptr *buffer, + uptr *sp) const { + CHECK(0 && "unimplemented"); + return 0; +} + +uptr SuspendedThreadsList::RegisterCount() { + CHECK(0 && "unimplemented"); + return 0; +} +} // namespace __sanitizer + +#endif // SANITIZER_MAC && (defined(__x86_64__) || defined(__aarch64__))