summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib
diff options
context:
space:
mode:
authorAlexander Potapenko <glider@google.com>2014-09-01 13:07:50 +0000
committerAlexander Potapenko <glider@google.com>2014-09-01 13:07:50 +0000
commita909e493f1cb80a3352ae7e4dc46815e0402f885 (patch)
treeffe8b08599ac5f3621d6ef716da1d6dbb61786ba /compiler-rt/lib
parent659dfb4dc8da626d0c8e4a68edc52ac0c9f8fb60 (diff)
downloadbcm5719-llvm-a909e493f1cb80a3352ae7e4dc46815e0402f885.tar.gz
bcm5719-llvm-a909e493f1cb80a3352ae7e4dc46815e0402f885.zip
[libsanitizer] Make sanitizer_unwind_posix.cc a libcdep source file.
Guard the source with #if SANITIZER_POSIX to fix compilation on Windows. use it only in llvm-svn: 216882
Diffstat (limited to 'compiler-rt/lib')
-rw-r--r--compiler-rt/lib/sanitizer_common/CMakeLists.txt4
-rw-r--r--compiler-rt/lib/sanitizer_common/sanitizer_unwind_posix_libcdep.cc (renamed from compiler-rt/lib/sanitizer_common/sanitizer_unwind_posix.cc)4
2 files changed, 5 insertions, 3 deletions
diff --git a/compiler-rt/lib/sanitizer_common/CMakeLists.txt b/compiler-rt/lib/sanitizer_common/CMakeLists.txt
index d78a4dbab6e..3b1fab8ec23 100644
--- a/compiler-rt/lib/sanitizer_common/CMakeLists.txt
+++ b/compiler-rt/lib/sanitizer_common/CMakeLists.txt
@@ -28,7 +28,6 @@ set(SANITIZER_SOURCES
sanitizer_symbolizer_win.cc
sanitizer_tls_get_addr.cc
sanitizer_thread_registry.cc
- sanitizer_unwind_posix.cc
sanitizer_win.cc)
set(SANITIZER_LIBCDEP_SOURCES
@@ -40,7 +39,8 @@ set(SANITIZER_LIBCDEP_SOURCES
sanitizer_stacktrace_libcdep.cc
sanitizer_stoptheworld_linux_libcdep.cc
sanitizer_symbolizer_libcdep.cc
- sanitizer_symbolizer_posix_libcdep.cc)
+ sanitizer_symbolizer_posix_libcdep.cc
+ sanitizer_unwind_posix_libcdep.cc)
# Explicitly list all sanitizer_common headers. Not all of these are
# included in sanitizer_common source files, but we need to depend on
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_unwind_posix.cc b/compiler-rt/lib/sanitizer_common/sanitizer_unwind_posix_libcdep.cc
index 535088cd537..bb4d4f57125 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_unwind_posix.cc
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_unwind_posix_libcdep.cc
@@ -12,7 +12,7 @@
//===----------------------------------------------------------------------===//
#include "sanitizer_platform.h"
-
+#if SANITIZER_POSIX
#include "sanitizer_common.h"
#include "sanitizer_stacktrace.h"
@@ -149,3 +149,5 @@ void StackTrace::SlowUnwindStackWithContext(uptr pc, void *context,
}
} // namespace __sanitizer
+
+#endif // SANITIZER_POSIX
OpenPOWER on IntegriCloud