Skip to content

Commit 343410d

Browse files
committed
[LSAN][NFC] Reformat test
1 parent b3ccfa1 commit 343410d

File tree

1 file changed

+12
-18
lines changed

1 file changed

+12
-18
lines changed

compiler-rt/test/lsan/TestCases/use_registers.cpp

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,14 @@
55
// RUN: %env_lsan_opts=$LSAN_BASE:"use_registers=1" %run %t 2>&1
66
// RUN: %env_lsan_opts="" %run %t 2>&1
77

8+
#include "sanitizer_common/print_address.h"
89
#include <assert.h>
910
#include <pthread.h>
1011
#include <sched.h>
1112
#include <stdio.h>
1213
#include <stdlib.h>
13-
#include "sanitizer_common/print_address.h"
1414

15-
extern "C"
16-
void *registers_thread_func(void *arg) {
15+
extern "C" void *registers_thread_func(void *arg) {
1716
int *sync = reinterpret_cast<int *>(arg);
1817
void *p = malloc(1337);
1918
print_address("Test alloc: ", 1, p);
@@ -22,30 +21,25 @@ void *registers_thread_func(void *arg) {
2221
// To store the pointer, choose a register which is unlikely to be reused by
2322
// a function call.
2423
#if defined(__i386__)
25-
asm ( "mov %0, %%esi"
24+
asm("mov %0, %%esi"
2625
:
27-
: "r" (p)
28-
);
26+
: "r"(p));
2927
#elif defined(__x86_64__)
30-
asm ( "mov %0, %%r15"
28+
asm("mov %0, %%r15"
3129
:
32-
: "r" (p)
33-
);
30+
: "r"(p));
3431
#elif defined(__mips__)
35-
asm ( "move $16, %0"
32+
asm("move $16, %0"
3633
:
37-
: "r" (p)
38-
);
34+
: "r"(p));
3935
#elif defined(__arm__)
40-
asm ( "mov r5, %0"
36+
asm("mov r5, %0"
4137
:
42-
: "r" (p)
43-
);
38+
: "r"(p));
4439
#elif defined(__powerpc__)
45-
asm ( "mr 30, %0"
40+
asm("mr 30, %0"
4641
:
47-
: "r" (p)
48-
);
42+
: "r"(p));
4943
#elif defined(__s390x__)
5044
asm("lgr %%r10, %0"
5145
:

0 commit comments

Comments
 (0)