diff options
| author | Reid Kleckner <rnk@google.com> | 2016-04-01 17:09:12 +0000 | 
|---|---|---|
| committer | Reid Kleckner <rnk@google.com> | 2016-04-01 17:09:12 +0000 | 
| commit | 1992ac75dbb41bae2c13fe94a7774dd89d7f8860 (patch) | |
| tree | 424fb26c95d17649a9d72066471801bad94da7b7 | |
| parent | a8e5c0c2007784e1ff4143db0b9c50612de0ca47 (diff) | |
| download | bcm5719-llvm-1992ac75dbb41bae2c13fe94a7774dd89d7f8860.tar.gz bcm5719-llvm-1992ac75dbb41bae2c13fe94a7774dd89d7f8860.zip  | |
Fix warnings uncovered by building with clang-cl
Move ifdefs to avoid unused static helpers. Move alignment attribute so
that it is respected in GCC and MSVC.
llvm-svn: 265153
| -rw-r--r-- | compiler-rt/lib/asan/asan_interceptors.cc | 4 | ||||
| -rw-r--r-- | compiler-rt/lib/sanitizer_common/sanitizer_libc.cc | 2 | 
2 files changed, 3 insertions, 3 deletions
diff --git a/compiler-rt/lib/asan/asan_interceptors.cc b/compiler-rt/lib/asan/asan_interceptors.cc index 232044a0f40..0f2ea5c8ecf 100644 --- a/compiler-rt/lib/asan/asan_interceptors.cc +++ b/compiler-rt/lib/asan/asan_interceptors.cc @@ -223,6 +223,7 @@ struct ThreadStartParam {    atomic_uintptr_t is_registered;  }; +#if ASAN_INTERCEPT_PTHREAD_CREATE  static thread_return_t THREAD_CALLING_CONV asan_thread_start(void *arg) {    ThreadStartParam *param = reinterpret_cast<ThreadStartParam *>(arg);    AsanThread *t = nullptr; @@ -233,7 +234,6 @@ static thread_return_t THREAD_CALLING_CONV asan_thread_start(void *arg) {    return t->ThreadStart(GetTid(), ¶m->is_registered);  } -#if ASAN_INTERCEPT_PTHREAD_CREATE  INTERCEPTOR(int, pthread_create, void *thread,      void *attr, void *(*start_routine)(void*), void *arg) {    EnsureMainThreadIDIsCorrect(); @@ -669,12 +669,12 @@ INTERCEPTOR(long long, atoll, const char *nptr) {  // NOLINT  }  #endif  // ASAN_INTERCEPT_ATOLL_AND_STRTOLL +#if ASAN_INTERCEPT___CXA_ATEXIT  static void AtCxaAtexit(void *unused) {    (void)unused;    StopInitOrderChecking();  } -#if ASAN_INTERCEPT___CXA_ATEXIT  INTERCEPTOR(int, __cxa_atexit, void (*func)(void *), void *arg,              void *dso_handle) {  #if SANITIZER_MAC diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_libc.cc b/compiler-rt/lib/sanitizer_common/sanitizer_libc.cc index cf31e689653..28f55ddd9f6 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_libc.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_libc.cc @@ -74,7 +74,7 @@ void *internal_memmove(void *dest, const void *src, uptr n) {  // Semi-fast bzero for 16-aligned data. Still far from peak performance.  void internal_bzero_aligned16(void *s, uptr n) { -  struct S16 { u64 a, b; } ALIGNED(16); +  struct ALIGNED(16) S16 { u64 a, b; };    CHECK_EQ((reinterpret_cast<uptr>(s) | n) & 15, 0);    for (S16 *p = reinterpret_cast<S16*>(s), *end = p + n / 16; p < end; p++) {      p->a = p->b = 0;  | 

