summaryrefslogtreecommitdiff
path: root/lib/asan/asan_mac.cc
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2012-11-21 12:38:58 +0000
committerKostya Serebryany <kcc@google.com>2012-11-21 12:38:58 +0000
commit5af39e50366f1aacbebc284f572f08ad1ad07357 (patch)
tree0db8df8b9a6f75e87bb8acd8a73705dc408662c9 /lib/asan/asan_mac.cc
parentdc2a27ecd65079f1916f5ab53ec646f9a9e61349 (diff)
downloadcompiler-rt-5af39e50366f1aacbebc284f572f08ad1ad07357.tar.gz
compiler-rt-5af39e50366f1aacbebc284f572f08ad1ad07357.tar.bz2
compiler-rt-5af39e50366f1aacbebc284f572f08ad1ad07357.tar.xz
[asan/tsan] do not use __WORDSIZE macro, as it is glibc-private thing. Instead, define our own SANITIZER_WORDSIZE
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@168424 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/asan/asan_mac.cc')
-rw-r--r--lib/asan/asan_mac.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/asan/asan_mac.cc b/lib/asan/asan_mac.cc
index 3ff84704..771b8b28 100644
--- a/lib/asan/asan_mac.cc
+++ b/lib/asan/asan_mac.cc
@@ -42,7 +42,7 @@ namespace __asan {
void GetPcSpBp(void *context, uptr *pc, uptr *sp, uptr *bp) {
ucontext_t *ucontext = (ucontext_t*)context;
-# if __WORDSIZE == 64
+# if SANITIZER_WORDSIZE == 64
*pc = ucontext->uc_mcontext->__ss.__rip;
*bp = ucontext->uc_mcontext->__ss.__rbp;
*sp = ucontext->uc_mcontext->__ss.__rsp;
@@ -50,7 +50,7 @@ void GetPcSpBp(void *context, uptr *pc, uptr *sp, uptr *bp) {
*pc = ucontext->uc_mcontext->__ss.__eip;
*bp = ucontext->uc_mcontext->__ss.__ebp;
*sp = ucontext->uc_mcontext->__ss.__esp;
-# endif // __WORDSIZE
+# endif // SANITIZER_WORDSIZE
}
int GetMacosVersion() {
@@ -179,7 +179,7 @@ void GetStackTrace(StackTrace *stack, uptr max_s, uptr pc, uptr bp) {
// kHighMemBeg or kHighMemEnd.
static void *island_allocator_pos = 0;
-#if __WORDSIZE == 32
+#if SANITIZER_WORDSIZE == 32
# define kIslandEnd (0xffdf0000 - kPageSize)
# define kIslandBeg (kIslandEnd - 256 * kPageSize)
#else