Skip to content

Commit 4890013

Browse files
committed
Fix formatting
1 parent 6ffa232 commit 4890013

File tree

6 files changed

+63
-63
lines changed

6 files changed

+63
-63
lines changed

compiler-rt/lib/interception/interception.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -378,16 +378,16 @@ inline void DoesNotSupportStaticLinking() {}
378378
#define INCLUDED_FROM_INTERCEPTION_LIB
379379

380380
#if SANITIZER_AIX
381-
# include "interception_aix.h"
382-
# define INTERCEPT_FUNCTION(func) INTERCEPT_FUNCTION_AIX(func)
383-
# define INTERCEPT_FUNCTION_VER(func, symver) INTERCEPT_FUNCTION_AIX(func)
381+
# include "interception_aix.h"
382+
# define INTERCEPT_FUNCTION(func) INTERCEPT_FUNCTION_AIX(func)
383+
# define INTERCEPT_FUNCTION_VER(func, symver) INTERCEPT_FUNCTION_AIX(func)
384384

385385
#elif SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_NETBSD || \
386386
SANITIZER_SOLARIS
387387

388-
# include "interception_linux.h"
389-
# define INTERCEPT_FUNCTION(func) INTERCEPT_FUNCTION_LINUX_OR_FREEBSD(func)
390-
# define INTERCEPT_FUNCTION_VER(func, symver) \
388+
# include "interception_linux.h"
389+
# define INTERCEPT_FUNCTION(func) INTERCEPT_FUNCTION_LINUX_OR_FREEBSD(func)
390+
# define INTERCEPT_FUNCTION_VER(func, symver) \
391391
INTERCEPT_FUNCTION_VER_LINUX_OR_FREEBSD(func, symver)
392392
#elif SANITIZER_APPLE
393393
# include "interception_mac.h"

compiler-rt/lib/interception/interception_aix.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ bool InterceptFunction(const char *name, uptr *ptr_to_real, uptr func,
3030
::__interception::InterceptFunction( \
3131
#func, (::__interception::uptr *)&REAL(func), \
3232
(::__interception::uptr) & (func), \
33-
(::__interception::uptr)&WRAP(func))
33+
(::__interception::uptr) & WRAP(func))
3434

3535
# endif // INTERCEPTION_AIX_H
3636
#endif // SANITIZER_AIX

compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -963,9 +963,9 @@ INTERCEPTOR(float, frexpf, float x, int *exp) {
963963
return res;
964964
}
965965

966-
#define INIT_FREXPF COMMON_INTERCEPT_FUNCTION(frexpf);
966+
# define INIT_FREXPF COMMON_INTERCEPT_FUNCTION(frexpf);
967967
#else
968-
#define INIT_FREXPF
968+
# define INIT_FREXPF
969969
#endif
970970

971971
#if SANITIZER_INTERCEPT_FREXPL
@@ -978,9 +978,9 @@ INTERCEPTOR(long double, frexpl, long double x, int *exp) {
978978
return res;
979979
}
980980

981-
#define INIT_FREXPL COMMON_INTERCEPT_FUNCTION_LDBL(frexpl)
981+
# define INIT_FREXPL COMMON_INTERCEPT_FUNCTION_LDBL(frexpl)
982982
#else
983-
#define INIT_FREXPL
983+
# define INIT_FREXPL
984984
#endif
985985

986986
#if SI_POSIX
@@ -1351,7 +1351,7 @@ INTERCEPTOR(unsigned long, time, unsigned long *t) {
13511351
static void unpoison_tm(void *ctx, __sanitizer_tm *tm) {
13521352
COMMON_INTERCEPTOR_WRITE_RANGE(ctx, tm, sizeof(*tm));
13531353
// AIX tm struct does not have tm_zone field.
1354-
#if !SANITIZER_SOLARIS && !SANITIZER_AIX
1354+
# if !SANITIZER_SOLARIS && !SANITIZER_AIX
13551355
if (tm->tm_zone) {
13561356
// Can not use COMMON_INTERCEPTOR_WRITE_RANGE here, because tm->tm_zone
13571357
// can point to shared memory and tsan would report a data race.
@@ -1736,12 +1736,12 @@ INTERCEPTOR(int, __vsprintf_chk, char *str, int flag, SIZE_T size_to,
17361736
VSPRINTF_INTERCEPTOR_IMPL(vsprintf, str, format, ap)
17371737
#endif
17381738

1739-
#if SANITIZER_INTERCEPT_VASPRINTF
1739+
# if SANITIZER_INTERCEPT_VASPRINTF
17401740
INTERCEPTOR(int, vasprintf, char **strp, const char *format, va_list ap)
17411741
VASPRINTF_INTERCEPTOR_IMPL(vasprintf, strp, format, ap)
1742-
#endif
1742+
# endif
17431743

1744-
#if SANITIZER_INTERCEPT_ISOC99_PRINTF
1744+
# if SANITIZER_INTERCEPT_ISOC99_PRINTF
17451745
INTERCEPTOR(int, __isoc99_vprintf, const char *format, va_list ap)
17461746
VPRINTF_INTERCEPTOR_IMPL(__isoc99_vprintf, format, ap)
17471747

@@ -1790,12 +1790,12 @@ INTERCEPTOR(int, __snprintf_chk, char *str, SIZE_T size, int flag,
17901790
FORMAT_INTERCEPTOR_IMPL(__snprintf_chk, vsnprintf, str, size, format)
17911791
#endif
17921792

1793-
#if SANITIZER_INTERCEPT_ASPRINTF
1793+
# if SANITIZER_INTERCEPT_ASPRINTF
17941794
INTERCEPTOR(int, asprintf, char **strp, const char *format, ...)
17951795
FORMAT_INTERCEPTOR_IMPL(asprintf, vasprintf, strp, format)
1796-
#endif
1796+
# endif
17971797

1798-
#if SANITIZER_INTERCEPT_ISOC99_PRINTF
1798+
# if SANITIZER_INTERCEPT_ISOC99_PRINTF
17991799
INTERCEPTOR(int, __isoc99_printf, const char *format, ...)
18001800
FORMAT_INTERCEPTOR_IMPL(__isoc99_printf, __isoc99_vprintf, format)
18011801

@@ -1816,29 +1816,29 @@ FORMAT_INTERCEPTOR_IMPL(__isoc99_snprintf, __isoc99_vsnprintf, str, size,
18161816
#endif // SANITIZER_INTERCEPT_PRINTF
18171817

18181818
#if SANITIZER_INTERCEPT_PRINTF
1819-
#if SANITIZER_AIX
1820-
#define INIT_PRINTF \
1821-
COMMON_INTERCEPT_FUNCTION_LDBL(printf); \
1822-
COMMON_INTERCEPT_FUNCTION_LDBL(sprintf); \
1823-
COMMON_INTERCEPT_FUNCTION_LDBL(snprintf); \
1824-
COMMON_INTERCEPT_FUNCTION_LDBL(fprintf); \
1825-
COMMON_INTERCEPT_FUNCTION_LDBL(vprintf); \
1826-
COMMON_INTERCEPT_FUNCTION_LDBL(vsprintf); \
1827-
COMMON_INTERCEPT_FUNCTION_LDBL(vsnprintf); \
1828-
COMMON_INTERCEPT_FUNCTION_LDBL(vfprintf);
1829-
#else
1830-
#define INIT_PRINTF \
1831-
COMMON_INTERCEPT_FUNCTION_LDBL(printf); \
1832-
COMMON_INTERCEPT_FUNCTION_LDBL(sprintf); \
1833-
COMMON_INTERCEPT_FUNCTION_LDBL(snprintf); \
1834-
COMMON_INTERCEPT_FUNCTION_LDBL(fprintf); \
1835-
COMMON_INTERCEPT_FUNCTION_LDBL(vprintf); \
1836-
COMMON_INTERCEPT_FUNCTION_LDBL(vsprintf); \
1837-
COMMON_INTERCEPT_FUNCTION_LDBL(vsnprintf); \
1838-
COMMON_INTERCEPT_FUNCTION_LDBL(asprintf); \
1839-
COMMON_INTERCEPT_FUNCTION_LDBL(vasprintf); \
1840-
COMMON_INTERCEPT_FUNCTION_LDBL(vfprintf);
1841-
#endif
1819+
# if SANITIZER_AIX
1820+
# define INIT_PRINTF \
1821+
COMMON_INTERCEPT_FUNCTION_LDBL(printf); \
1822+
COMMON_INTERCEPT_FUNCTION_LDBL(sprintf); \
1823+
COMMON_INTERCEPT_FUNCTION_LDBL(snprintf); \
1824+
COMMON_INTERCEPT_FUNCTION_LDBL(fprintf); \
1825+
COMMON_INTERCEPT_FUNCTION_LDBL(vprintf); \
1826+
COMMON_INTERCEPT_FUNCTION_LDBL(vsprintf); \
1827+
COMMON_INTERCEPT_FUNCTION_LDBL(vsnprintf); \
1828+
COMMON_INTERCEPT_FUNCTION_LDBL(vfprintf);
1829+
# else
1830+
# define INIT_PRINTF \
1831+
COMMON_INTERCEPT_FUNCTION_LDBL(printf); \
1832+
COMMON_INTERCEPT_FUNCTION_LDBL(sprintf); \
1833+
COMMON_INTERCEPT_FUNCTION_LDBL(snprintf); \
1834+
COMMON_INTERCEPT_FUNCTION_LDBL(fprintf); \
1835+
COMMON_INTERCEPT_FUNCTION_LDBL(vprintf); \
1836+
COMMON_INTERCEPT_FUNCTION_LDBL(vsprintf); \
1837+
COMMON_INTERCEPT_FUNCTION_LDBL(vsnprintf); \
1838+
COMMON_INTERCEPT_FUNCTION_LDBL(asprintf); \
1839+
COMMON_INTERCEPT_FUNCTION_LDBL(vasprintf); \
1840+
COMMON_INTERCEPT_FUNCTION_LDBL(vfprintf);
1841+
# endif
18421842
#else
18431843
#define INIT_PRINTF
18441844
#endif
@@ -3922,11 +3922,11 @@ INTERCEPTOR(SIZE_T, wcrtomb, char *dest, wchar_t src, void *ps) {
39223922
if (res != ((SIZE_T)-1)) {
39233923
CHECK_LE(res, sizeof(local_dest));
39243924
COMMON_INTERCEPTOR_WRITE_RANGE(ctx, dest, res);
3925-
#if !SANITIZER_AIX
3926-
REAL(memcpy)(dest, local_dest, res);
3927-
#else
3928-
internal_memcpy(dest, local_dest, res);
3929-
#endif
3925+
# if !SANITIZER_AIX
3926+
REAL(memcpy)(dest, local_dest, res);
3927+
# else
3928+
internal_memcpy(dest, local_dest, res);
3929+
# endif
39303930
}
39313931
return res;
39323932
}
@@ -3948,11 +3948,11 @@ INTERCEPTOR(int, wctomb, char *dest, wchar_t src) {
39483948
if (res != -1) {
39493949
CHECK_LE(res, sizeof(local_dest));
39503950
COMMON_INTERCEPTOR_WRITE_RANGE(ctx, dest, res);
3951-
#if !SANITIZER_AIX
3952-
REAL(memcpy)(dest, local_dest, res);
3953-
#else
3954-
internal_memcpy(dest, local_dest, res);
3955-
#endif
3951+
# if !SANITIZER_AIX
3952+
REAL(memcpy)(dest, local_dest, res);
3953+
# else
3954+
internal_memcpy(dest, local_dest, res);
3955+
# endif
39563956
}
39573957
return res;
39583958
}

compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ static void ioctl_table_fill() {
7373
_(TIOCNXCL, NONE, 0);
7474
_(TIOCOUTQ, WRITE, sizeof(int));
7575
_(TIOCPKT, READ, sizeof(int));
76-
#if !SANITIZER_AIX
76+
# if !SANITIZER_AIX
7777
_(TIOCSCTTY, NONE, 0);
78-
#endif
78+
# endif
7979
_(TIOCSETD, READ, sizeof(int));
8080
_(TIOCSPGRP, READ, pid_t_sz);
8181
_(TIOCSTI, READ, sizeof(char));

compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_memintrinsics.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
#elif SANITIZER_WINDOWS64
3838
#define PLATFORM_HAS_DIFFERENT_MEMCPY_AND_MEMMOVE 0
3939
#elif SANITIZER_AIX
40-
#define PLATFORM_HAS_DIFFERENT_MEMCPY_AND_MEMMOVE 0
40+
# define PLATFORM_HAS_DIFFERENT_MEMCPY_AND_MEMMOVE 0
4141
#else
4242
#define PLATFORM_HAS_DIFFERENT_MEMCPY_AND_MEMMOVE 1
4343
#endif // SANITIZER_APPLE

compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,9 @@ SANITIZER_WEAK_IMPORT void *aligned_alloc(__sanitizer::usize __alignment,
140140
#endif
141141

142142
#if SANITIZER_AIX
143-
#define SI_NOT_AIX 0
143+
# define SI_NOT_AIX 0
144144
#else
145-
#define SI_NOT_AIX 1
145+
# define SI_NOT_AIX 1
146146
#endif
147147

148148
#if SANITIZER_SOLARIS32
@@ -237,11 +237,11 @@ SANITIZER_WEAK_IMPORT void *aligned_alloc(__sanitizer::usize __alignment,
237237
#define SANITIZER_INTERCEPT_ISOC99_SCANF SI_GLIBC
238238

239239
#ifndef SANITIZER_INTERCEPT_PRINTF
240-
#define SANITIZER_INTERCEPT_ASPRINTF SI_NOT_AIX
241-
#define SANITIZER_INTERCEPT_VASPRINTF SI_NOT_AIX
242-
#define SANITIZER_INTERCEPT_PRINTF SI_POSIX
243-
#define SANITIZER_INTERCEPT_PRINTF_L (SI_FREEBSD || SI_NETBSD)
244-
#define SANITIZER_INTERCEPT_ISOC99_PRINTF SI_GLIBC
240+
# define SANITIZER_INTERCEPT_ASPRINTF SI_NOT_AIX
241+
# define SANITIZER_INTERCEPT_VASPRINTF SI_NOT_AIX
242+
# define SANITIZER_INTERCEPT_PRINTF SI_POSIX
243+
# define SANITIZER_INTERCEPT_PRINTF_L (SI_FREEBSD || SI_NETBSD)
244+
# define SANITIZER_INTERCEPT_ISOC99_PRINTF SI_GLIBC
245245
#endif
246246

247247
#define SANITIZER_INTERCEPT___PRINTF_CHK \
@@ -512,8 +512,8 @@ SANITIZER_WEAK_IMPORT void *aligned_alloc(__sanitizer::usize __alignment,
512512
#define SANITIZER_INTERCEPT_EVENTFD_READ_WRITE (SI_LINUX || SI_FREEBSD)
513513

514514
#define SI_STAT_LINUX (SI_LINUX && __GLIBC_PREREQ(2, 33))
515-
#define SANITIZER_INTERCEPT_STAT \
516-
(SI_FREEBSD || SI_MAC || SI_ANDROID || SI_NETBSD || SI_SOLARIS || \
515+
#define SANITIZER_INTERCEPT_STAT \
516+
(SI_FREEBSD || SI_MAC || SI_ANDROID || SI_NETBSD || SI_SOLARIS || \
517517
SI_STAT_LINUX || !SI_NOT_AIX)
518518
#define SANITIZER_INTERCEPT_STAT64 \
519519
((SI_STAT_LINUX || !SI_NOT_AIX) && SANITIZER_HAS_STAT64)

0 commit comments

Comments
 (0)