diff options
author | Kostya Serebryany <kcc@google.com> | 2012-11-21 12:38:58 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2012-11-21 12:38:58 +0000 |
commit | 5af39e50366f1aacbebc284f572f08ad1ad07357 (patch) | |
tree | 0db8df8b9a6f75e87bb8acd8a73705dc408662c9 /lib/asan/asan_mac.cc | |
parent | dc2a27ecd65079f1916f5ab53ec646f9a9e61349 (diff) | |
download | compiler-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.cc | 6 |
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 |