Skip to content

Commit c21909a

Browse files
committed
[NFC][sanitizer] Simplify ifdef
1 parent 7005772 commit c21909a

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp

+3-7
Original file line numberDiff line numberDiff line change
@@ -239,15 +239,10 @@ void InitTlsSize() {
239239
((void (*)(size_t *, size_t *))get_tls_static_info)(&g_tls_size, &tls_align);
240240
# endif
241241
}
242-
# else
243-
void InitTlsSize() {}
244-
# endif // SANITIZER_GLIBC && !SANITIZER_GO
245242

246243
// On glibc x86_64, ThreadDescriptorSize() needs to be precise due to the usage
247244
// of g_tls_size. On other targets, ThreadDescriptorSize() is only used by lsan
248245
// to get the pointer to thread-specific data keys in the thread control block.
249-
# if (SANITIZER_FREEBSD || SANITIZER_LINUX || SANITIZER_SOLARIS) && \
250-
!SANITIZER_ANDROID && !SANITIZER_GO
251246
// sizeof(struct pthread) from glibc.
252247
static atomic_uintptr_t thread_descriptor_size;
253248

@@ -465,8 +460,9 @@ __attribute__((unused)) static void GetStaticTlsBoundary(uptr *addr, uptr *size,
465460
*addr = ranges[l].begin;
466461
*size = ranges[r - 1].end - ranges[l].begin;
467462
}
468-
# endif // (x86_64 || i386 || mips || ...) && (SANITIZER_FREEBSD ||
469-
// SANITIZER_LINUX) && !SANITIZER_ANDROID && !SANITIZER_GO
463+
# else
464+
void InitTlsSize() {}
465+
# endif // SANITIZER_GLIBC && !SANITIZER_GO
470466

471467
# if SANITIZER_NETBSD
472468
static struct tls_tcb *ThreadSelfTlsTcb() {

0 commit comments

Comments
 (0)