Skip to content

Commit 69c0b2f

Browse files
authored
[libc][NFC] Remove all trailing spaces from libc (llvm#82831)
Summary: There are a lot of random training spaces on various lines. This patch just got rid of all of them with `sed 's/\ \+$//g'.
1 parent 2594095 commit 69c0b2f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+229
-229
lines changed

libc/AOR_v20.02/string/arm/memchr.S

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ __memchr_arm:
4949
and r1,r1,#0xff @ Don't think we can trust the caller to actually pass a char
5050

5151
cmp r2,#16 @ If it's short don't bother with anything clever
52-
blt 20f
52+
blt 20f
5353

5454
tst r0, #7 @ If it's already aligned skip the next bit
5555
beq 10f
@@ -62,7 +62,7 @@ __memchr_arm:
6262
beq 50f @ If it matches exit found
6363
tst r0, #7
6464
bne 5b @ If not aligned yet then do next byte
65-
65+
6666
10:
6767
@ At this point, we are aligned, we know we have at least 8 bytes to work with
6868
push {r4,r5,r6,r7}
@@ -71,7 +71,7 @@ __memchr_arm:
7171
bic r4, r2, #7 @ Number of double words to work with
7272
mvns r7, #0 @ all F's
7373
movs r3, #0
74-
74+
7575
15:
7676
ldmia r0!,{r5,r6}
7777
subs r4, r4, #8
@@ -87,7 +87,7 @@ __memchr_arm:
8787
pop {r4,r5,r6,r7}
8888
and r1,r1,#0xff @ Get r1 back to a single character from the expansion above
8989
and r2,r2,#7 @ Leave the count remaining as the number after the double words have been done
90-
90+
9191
20:
9292
cbz r2, 40f @ 0 length or hit the end already then not found
9393

libc/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ elseif(LIBC_CMAKE_VERBOSE_LOGGING)
162162
message(STATUS "Path for config files is: ${LIBC_CONFIG_PATH}")
163163
endif()
164164

165-
# option(LIBC_ENABLE_WIDE_CHARACTERS
165+
# option(LIBC_ENABLE_WIDE_CHARACTERS
166166
# "Whether to enable wide character functions on supported platforms. This may
167167
# also set flags to enable or disable wide character support within other
168168
# functions (e.g. printf)." ON)

libc/benchmarks/automemcpy/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ git clone https://github.com/Z3Prover/z3.git
1717
python scripts/mk_make.py --prefix=<Z3_INSTALL_DIR>
1818
cd build
1919
make -j
20-
make install
20+
make install
2121
```
2222

2323
## Configuration
@@ -68,7 +68,7 @@ Make sure to save the results of the benchmark as a json file.
6868
By default, each function is benchmarked for at least one second, here we lower it to 200ms.
6969

7070
- `--benchmark_filter="BM_Memset|BM_Bzero"`
71-
71+
7272
By default, all functions are benchmarked, here we restrict them to `memset` and `bzero`.
7373

7474
Other options might be useful, use `--help` for more information.

libc/cmake/modules/CheckCompilerFeatures.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ foreach(feature IN LISTS ALL_COMPILER_FEATURES)
5757
if(${feature} STREQUAL "float128")
5858
set(LIBC_COMPILER_HAS_FLOAT128 TRUE)
5959
elseif(${feature} STREQUAL "fixed_point")
60-
set(LIBC_COMPILER_HAS_FIXED_POINT TRUE)
60+
set(LIBC_COMPILER_HAS_FIXED_POINT TRUE)
6161
endif()
6262
endif()
6363
endforeach()

libc/cmake/modules/LLVMLibCCompileOptionRules.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ function(_get_compile_options_from_flags output_var)
66
endif()
77
check_flag(ADD_SSE4_2_FLAG ${ROUND_OPT_FLAG} ${flags})
88
check_flag(ADD_EXPLICIT_SIMD_OPT_FLAG ${EXPLICIT_SIMD_OPT_FLAG} ${flags})
9-
9+
1010
if(LLVM_COMPILER_IS_GCC_COMPATIBLE)
1111
if(ADD_FMA_FLAG)
1212
if(LIBC_TARGET_ARCHITECTURE_IS_X86)

libc/cmake/modules/LLVMLibCLibraryRules.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ function(add_gpu_entrypoint_library target_name base_target_name)
125125
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/binary/${name}.gpubin"
126126
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/binary
127127
COMMAND ${LIBC_CLANG_OFFLOAD_PACKAGER}
128-
"${prefix},file=$<JOIN:${object},,file=>" -o
128+
"${prefix},file=$<JOIN:${object},,file=>" -o
129129
${CMAKE_CURRENT_BINARY_DIR}/binary/${name}.gpubin
130130
DEPENDS ${dep} ${base_target_name}
131131
COMMENT "Packaging LLVM offloading binary for '${object}'"
@@ -142,7 +142,7 @@ function(add_gpu_entrypoint_library target_name base_target_name)
142142
COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/stubs/${name}.cpp
143143
DEPENDS ${dep} ${dep}.__gpubin__ ${base_target_name}
144144
)
145-
add_custom_target(${dep}.__stub__
145+
add_custom_target(${dep}.__stub__
146146
DEPENDS ${dep}.__gpubin__ "${CMAKE_CURRENT_BINARY_DIR}/stubs/${name}.cpp")
147147

148148
add_library(${dep}.__fatbin__
@@ -151,9 +151,9 @@ function(add_gpu_entrypoint_library target_name base_target_name)
151151
)
152152

153153
# This is always compiled for the LLVM host triple instead of the native GPU
154-
# triple that is used by default in the build.
154+
# triple that is used by default in the build.
155155
target_compile_options(${dep}.__fatbin__ BEFORE PRIVATE -nostdlib)
156-
target_compile_options(${dep}.__fatbin__ PRIVATE
156+
target_compile_options(${dep}.__fatbin__ PRIVATE
157157
--target=${LLVM_HOST_TRIPLE}
158158
"SHELL:-Xclang -fembed-offload-object=${CMAKE_CURRENT_BINARY_DIR}/binary/${name}.gpubin")
159159
add_dependencies(${dep}.__fatbin__

libc/cmake/modules/LLVMLibCObjectRules.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ function(create_entrypoint_object fq_target_name)
284284

285285
# The NVPTX target cannot use LTO for the internal targets used for testing.
286286
if(LIBC_TARGET_ARCHITECTURE_IS_NVPTX)
287-
target_compile_options(${internal_target_name} PRIVATE
287+
target_compile_options(${internal_target_name} PRIVATE
288288
-fno-lto -march=${LIBC_GPU_TARGET_ARCHITECTURE})
289289
endif()
290290

libc/cmake/modules/LLVMLibCTestRules.cmake

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -318,8 +318,8 @@ function(add_libc_fuzzer target_name)
318318
target_include_directories(${fq_target_name} SYSTEM PRIVATE ${LIBC_INCLUDE_DIR})
319319
target_include_directories(${fq_target_name} PRIVATE ${LIBC_SOURCE_DIR})
320320

321-
target_link_libraries(${fq_target_name} PRIVATE
322-
${link_object_files}
321+
target_link_libraries(${fq_target_name} PRIVATE
322+
${link_object_files}
323323
${LIBC_FUZZER_LINK_LIBRARIES}
324324
)
325325

@@ -352,7 +352,7 @@ endif()
352352
# system libc are linked in to the final executable. The final exe is fully
353353
# statically linked. The libc that the final exe links to consists of only
354354
# the object files of the DEPENDS targets.
355-
#
355+
#
356356
# Usage:
357357
# add_integration_test(
358358
# <target name>
@@ -462,15 +462,15 @@ function(add_integration_test test_name)
462462
target_compile_options(${fq_build_target_name} PRIVATE ${compile_options})
463463

464464
if(LIBC_TARGET_ARCHITECTURE_IS_AMDGPU)
465-
target_link_options(${fq_build_target_name} PRIVATE
465+
target_link_options(${fq_build_target_name} PRIVATE
466466
${LIBC_COMPILE_OPTIONS_DEFAULT}
467467
-mcpu=${LIBC_GPU_TARGET_ARCHITECTURE} -flto
468468
"-Wl,-mllvm,-amdgpu-lower-global-ctor-dtor=0" -nostdlib -static
469469
"-Wl,-mllvm,-amdhsa-code-object-version=${LIBC_GPU_CODE_OBJECT_VERSION}")
470470
elseif(LIBC_TARGET_ARCHITECTURE_IS_NVPTX)
471471
# We need to use the internal object versions for NVPTX.
472472
set(internal_suffix ".__internal__")
473-
target_link_options(${fq_build_target_name} PRIVATE
473+
target_link_options(${fq_build_target_name} PRIVATE
474474
${LIBC_COMPILE_OPTIONS_DEFAULT}
475475
"-Wl,--suppress-stack-size-warning"
476476
-march=${LIBC_GPU_TARGET_ARCHITECTURE} -nostdlib -static
@@ -645,15 +645,15 @@ function(add_libc_hermetic_test test_name)
645645
endforeach()
646646

647647
if(LIBC_TARGET_ARCHITECTURE_IS_AMDGPU)
648-
target_link_options(${fq_build_target_name} PRIVATE
648+
target_link_options(${fq_build_target_name} PRIVATE
649649
${LIBC_COMPILE_OPTIONS_DEFAULT}
650650
-mcpu=${LIBC_GPU_TARGET_ARCHITECTURE} -flto
651651
"-Wl,-mllvm,-amdgpu-lower-global-ctor-dtor=0" -nostdlib -static
652652
"-Wl,-mllvm,-amdhsa-code-object-version=${LIBC_GPU_CODE_OBJECT_VERSION}")
653653
elseif(LIBC_TARGET_ARCHITECTURE_IS_NVPTX)
654654
# We need to use the internal object versions for NVPTX.
655655
set(internal_suffix ".__internal__")
656-
target_link_options(${fq_build_target_name} PRIVATE
656+
target_link_options(${fq_build_target_name} PRIVATE
657657
${LIBC_COMPILE_OPTIONS_DEFAULT}
658658
"-Wl,--suppress-stack-size-warning"
659659
-march=${LIBC_GPU_TARGET_ARCHITECTURE} -nostdlib -static

libc/config/darwin/x86_64/entrypoints.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ set(TARGET_LIBC_ENTRYPOINTS
1616
libc.src.ctype.toascii
1717
libc.src.ctype.tolower
1818
libc.src.ctype.toupper
19-
19+
2020
# string.h entrypoints
2121
libc.src.string.bcmp
2222
libc.src.string.bzero

libc/config/linux/x86_64/exclude.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ try_compile(
99
)
1010

1111
if(NOT has_sys_random)
12-
list(APPEND TARGET_LLVMLIBC_REMOVED_ENTRYPOINTS
12+
list(APPEND TARGET_LLVMLIBC_REMOVED_ENTRYPOINTS
1313
libc.src.sys.stat.stat
1414
)
1515
# If we're doing a fullbuild we provide the random header ourselves.
1616
if(NOT LLVM_LIBC_FULL_BUILD)
17-
list(APPEND TARGET_LLVMLIBC_REMOVED_ENTRYPOINTS
17+
list(APPEND TARGET_LLVMLIBC_REMOVED_ENTRYPOINTS
1818
libc.src.sys.random.getrandom
1919
)
2020
endif()

0 commit comments

Comments
 (0)