Skip to content

[libc][NFC] Strip all training whitespace and missing newlines #124163

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libc/benchmarks/distributions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ As identified in the [automemcpy](https://research.google/pubs/pub50338/) paper:

## Note

Except for `GoogleD`, all distributions are gathered over one week worth of data.
Except for `GoogleD`, all distributions are gathered over one week worth of data.
2 changes: 1 addition & 1 deletion libc/benchmarks/gpu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function(add_benchmark benchmark_name)
"LINK_LIBRARIES;DEPENDS" # Multi-value arguments
${ARGN}
)

if(NOT libc.src.time.clock IN_LIST TARGET_LLVMLIBC_ENTRYPOINTS)
message(FATAL_ERROR "target does not support clock")
endif()
Expand Down
2 changes: 1 addition & 1 deletion libc/config/baremetal/riscv/entrypoints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ if(LIBC_COMPILER_HAS_FIXED_POINT)
libc.src.stdfix.kbits
libc.src.stdfix.ukbits
libc.src.stdfix.lkbits
libc.src.stdfix.ulkbits
libc.src.stdfix.ulkbits
)
endif()

Expand Down
2 changes: 1 addition & 1 deletion libc/config/linux/aarch64/entrypoints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.fabs
libc.src.math.fabsf
libc.src.math.fabsl
libc.src.math.fadd
libc.src.math.fadd
libc.src.math.faddl
libc.src.math.fadd
libc.src.math.fdim
Expand Down
4 changes: 2 additions & 2 deletions libc/config/linux/arm/entrypoints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.complex.cproj
libc.src.complex.cprojf
libc.src.complex.cprojl

# fenv.h entrypoints
libc.src.fenv.feclearexcept
libc.src.fenv.fedisableexcept
Expand Down Expand Up @@ -268,7 +268,7 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.fabs
libc.src.math.fabsf
libc.src.math.fabsl
libc.src.math.fadd
libc.src.math.fadd
libc.src.math.faddl
libc.src.math.fadd
libc.src.math.fdim
Expand Down
4 changes: 2 additions & 2 deletions libc/config/linux/riscv/entrypoints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.fabs
libc.src.math.fabsf
libc.src.math.fabsl
libc.src.math.fadd
libc.src.math.fadd
libc.src.math.faddl
libc.src.math.fadd
libc.src.math.fdim
Expand Down Expand Up @@ -630,7 +630,7 @@ if(LIBC_TYPES_HAS_CFLOAT128)
)
endif()

if(LIBC_TYPES_HAS_FLOAT128)
if(LIBC_TYPES_HAS_FLOAT128)
list(APPEND TARGET_LIBM_ENTRYPOINTS
# math.h C23 _Float128 entrypoints
libc.src.math.canonicalizef128
Expand Down
6 changes: 3 additions & 3 deletions libc/config/linux/x86_64/entrypoints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.complex.cproj
libc.src.complex.cprojf
libc.src.complex.cprojl

# fenv.h entrypoints
libc.src.fenv.feclearexcept
libc.src.fenv.fedisableexcept
Expand Down Expand Up @@ -440,7 +440,7 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.fabs
libc.src.math.fabsf
libc.src.math.fabsl
libc.src.math.fadd
libc.src.math.fadd
libc.src.math.faddl
libc.src.math.fadd
libc.src.math.fdim
Expand Down Expand Up @@ -756,7 +756,7 @@ if(LIBC_TYPES_HAS_CFLOAT128)
endif()

if(LIBC_TYPES_HAS_FLOAT128)
list(APPEND TARGET_LIBM_ENTRYPOINTS
list(APPEND TARGET_LIBM_ENTRYPOINTS
# math.h C23 _Float128 entrypoints
libc.src.math.canonicalizef128
libc.src.math.ceilf128
Expand Down
2 changes: 1 addition & 1 deletion libc/docs/dev/printf_behavior.rst
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ If a number passed as a field width or precision value is out of range for an
int, then it will be treated as the largest value in the int range
(e.g. "%-999999999999.999999999999s" is the same as "%-2147483647.2147483647s").

If the field width is set to INT_MIN by using the '*' form,
If the field width is set to INT_MIN by using the '*' form,
e.g. printf("%*d", INT_MIN, 1), it will be treated as INT_MAX, since -INT_MIN is
not representable as an int.

Expand Down
4 changes: 2 additions & 2 deletions libc/docs/dev/undefined_behavior.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ POSIX.1 leaves that when the name of a shared memory object does not begin with
Handling of NULL arguments to the 's' format specifier
------------------------------------------------------
The C standard does not specify behavior for ``printf("%s", NULL)``. We will
print the string literal ``(null)`` unless using the
``LIBC_COPT_PRINTF_NO_NULLPTR_CHECKS`` option described in :ref:`printf
print the string literal ``(null)`` unless using the
``LIBC_COPT_PRINTF_NO_NULLPTR_CHECKS`` option described in :ref:`printf
behavior<printf_behavior>`.

Unknown Math Rounding Direction
Expand Down
4 changes: 2 additions & 2 deletions libc/docs/gpu/rpc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ linked in by forwarding the static library to the device-side link job.
Extensions
----------

The opcode is a 32-bit integer that must be unique to the requested operation.
All opcodes used by ``libc`` internally have the character ``c`` in the most
The opcode is a 32-bit integer that must be unique to the requested operation.
All opcodes used by ``libc`` internally have the character ``c`` in the most
significant byte. Any other opcode is available for use outside of the ``libc``
implementation.
2 changes: 1 addition & 1 deletion libc/docs/platform_support.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ For Linux, we support kernel versions as listed on
date), ``stable``, and ``mainline`` versions. We actively adopt new features
from ``linux-next``.

For Windows, we plan to support products within their lifecycle. Please refer to
For Windows, we plan to support products within their lifecycle. Please refer to
`Search Product and Services Lifecycle Information <https://learn.microsoft.com/en-us/lifecycle/products/?products=windows>`_ for more information.

LLVM-libc does not guarantee backward compatibility with operating systems that
Expand Down
2 changes: 1 addition & 1 deletion libc/fuzzing/__support/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ add_libc_fuzzer(
libc.src.__support.HashTable.table
COMPILE_OPTIONS
-D__LIBC_EXPLICIT_SIMD_OPT
)
)

# TODO: FreeListHeap uses the _end symbol which conflicts with the _end symbol
# defined by GPU start.cpp files so for now we exclude this fuzzer on GPU.
Expand Down
12 changes: 6 additions & 6 deletions libc/include/llvm-libc-types/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,15 @@ add_header(__getoptargv_t HDR __getoptargv_t.h)
add_header(wchar_t HDR wchar_t.h)
add_header(char8_t HDR char8_t.h)
add_header(
char16_t
HDR
char16_t
HDR
char16_t.h
DEPENDS
libc.include.llvm-libc-macros.stdint_macros
)
add_header(
char32_t
HDR
char32_t
HDR
char32_t.h
DEPENDS
libc.include.llvm-libc-macros.stdint_macros
Expand Down Expand Up @@ -145,8 +145,8 @@ add_header(cfloat16 HDR cfloat16.h)
add_header(fsblkcnt_t HDR fsblkcnt_t.h)
add_header(fsfilcnt_t HDR fsfilcnt_t.h)
add_header(
struct_statvfs
HDR
struct_statvfs
HDR
struct_statvfs.h
DEPENDS
.fsblkcnt_t
Expand Down
2 changes: 1 addition & 1 deletion libc/include/stdfix.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
header: stdfix.h
header_template: stdfix.h.def
macros: []
types:
types:
- type_name: stdfix-types
enums: []
objects: []
Expand Down
2 changes: 1 addition & 1 deletion libc/include/sys/uio.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
header: sys/uio.h
header_template: uio.h.def
macros: []
types:
types:
- type_name: struct_iovec
- type_name: ssize_t
enums: []
Expand Down
4 changes: 2 additions & 2 deletions libc/src/__support/CPP/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ add_header_library(
.string_view
libc.hdr.func.free
libc.hdr.func.malloc
libc.hdr.func.realloc
libc.hdr.func.realloc
libc.src.__support.common
libc.src.__support.integer_to_string
libc.src.string.memory_utils.inline_memcpy
Expand Down Expand Up @@ -203,7 +203,7 @@ add_object_library(
DEPENDS
libc.hdr.func.free
libc.hdr.func.malloc
libc.hdr.func.aligned_alloc
libc.hdr.func.aligned_alloc
libc.src.__support.common
libc.src.__support.macros.properties.os
)
2 changes: 1 addition & 1 deletion libc/src/__support/threads/linux/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ add_object_library(
.futex_utils
libc.config.app_h
libc.include.sys_syscall
libc.hdr.fcntl_macros
libc.hdr.fcntl_macros
libc.src.errno.errno
libc.src.__support.CPP.atomic
libc.src.__support.CPP.stringstream
Expand Down
2 changes: 1 addition & 1 deletion libc/src/__support/threads/spin_lock.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class SpinLock {
// .LBB0_2: | jmp .LBB0_4
// isb | .LBB0_2:
// .LBB0_3: | pause
// ldrb w9, [x0] | .LBB0_3:
// ldrb w9, [x0] | .LBB0_3:
// tbnz w9, #0, .LBB0_2 | movzx eax, byte ptr [rdi]
// b .LBB0_1 | test al, 1
// .LBB0_4: | jne .LBB0_2
Expand Down
2 changes: 1 addition & 1 deletion libc/src/__support/time/windows/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
add_header_library(
performance_counter
performance_counter
HDRS
performance_counter.h
DEPENDS
Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/nvptx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if(CUDAToolkit_FOUND)
if (EXISTS ${libdevice_path})
message(STATUS "Found the CUDA device library. Implementations falling back "
"to the vendor libraries will be resolved statically.")
set(bitcode_link_flags
set(bitcode_link_flags
"SHELL:-Xclang -mlink-builtin-bitcode -Xclang ${libdevice_path}")
endif()
else()
Expand Down
6 changes: 3 additions & 3 deletions libc/src/stdlib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ add_entrypoint_object(
libc.src.__support.OSUtil.osutil
)

# TODO: Move all exit functions to linux specific
# TODO: Move all exit functions to linux specific

if(TARGET libc.src.__support.threads.mutex)
add_header_library(
Expand All @@ -563,7 +563,7 @@ add_entrypoint_object(
HDRS
atexit.h
CXX_STANDARD
20 # For constinit
20 # For constinit
DEPENDS
.exit_handler
)
Expand All @@ -575,7 +575,7 @@ add_entrypoint_object(
HDRS
at_quick_exit.h
CXX_STANDARD
20 # For constinit
20 # For constinit
DEPENDS
.exit_handler
.atexit
Expand Down
2 changes: 1 addition & 1 deletion libc/test/src/__support/File/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ add_libc_test(
DEPENDS
libc.include.stdio
libc.hdr.types.size_t
libc.src.errno.errno
libc.src.errno.errno
libc.src.__support.CPP.new
libc.src.__support.File.file
)
Expand Down
4 changes: 2 additions & 2 deletions libc/test/src/math/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ add_fp_unittest(
SRCS
sinf16_test.cpp
DEPENDS
libc.src.math.sinf16
libc.src.math.sinf16
)

add_fp_unittest(
Expand Down Expand Up @@ -198,7 +198,7 @@ add_fp_unittest(
SRCS
tanf16_test.cpp
DEPENDS
libc.src.math.tanf16
libc.src.math.tanf16
)

add_fp_unittest(
Expand Down
2 changes: 1 addition & 1 deletion libc/test/src/math/smoke/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ add_fp_unittest(
tanf16_test.cpp
DEPENDS
libc.src.errno.errno
libc.src.math.tanf16
libc.src.math.tanf16
)

add_fp_unittest(
Expand Down
6 changes: 3 additions & 3 deletions libc/test/src/signal/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ add_libc_unittest(
sigaddset_test.cpp
DEPENDS
libc.include.signal
libc.src.errno.errno
libc.src.errno.errno
libc.src.signal.sigaddset
libc.test.UnitTest.ErrnoSetterMatcher
)
Expand All @@ -89,7 +89,7 @@ add_libc_unittest(
sigfillset_test.cpp
DEPENDS
libc.include.signal
libc.src.errno.errno
libc.src.errno.errno
libc.src.signal.raise
libc.src.signal.sigfillset
libc.src.signal.sigprocmask
Expand All @@ -104,7 +104,7 @@ add_libc_unittest(
sigdelset_test.cpp
DEPENDS
libc.include.signal
libc.src.errno.errno
libc.src.errno.errno
libc.src.signal.raise
libc.src.signal.sigdelset
libc.src.signal.sigfillset
Expand Down
2 changes: 1 addition & 1 deletion libc/test/src/stdfix/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ foreach(suffix IN ITEMS hr r lr hk k lk uhr ur ulr uhk uk ulk)
libc.src.stdfix.round${suffix}
libc.src.__support.fixed_point.fx_bits
)

add_libc_test(
${suffix}bits_test
SUITE
Expand Down
2 changes: 1 addition & 1 deletion libc/test/src/sys/resource/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ add_libc_unittest(
DEPENDS
libc.include.fcntl
libc.include.sys_resource
libc.src.errno.errno
libc.src.errno.errno
libc.src.fcntl.open
libc.src.sys.resource.getrlimit
libc.src.sys.resource.setrlimit
Expand Down
4 changes: 2 additions & 2 deletions libc/test/src/sys/select/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ add_libc_unittest(
select_ui_test.cpp
DEPENDS
libc.include.unistd
libc.src.errno.errno
libc.src.errno.errno
libc.src.sys.select.select
libc.src.unistd.read
)
Expand All @@ -22,7 +22,7 @@ add_libc_unittest(
select_failure_test.cpp
DEPENDS
libc.include.unistd
libc.src.errno.errno
libc.src.errno.errno
libc.src.sys.select.select
libc.src.unistd.read
libc.test.UnitTest.ErrnoSetterMatcher
Expand Down
2 changes: 1 addition & 1 deletion libc/test/src/sys/sendfile/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ add_libc_unittest(
DEPENDS
libc.hdr.fcntl_macros
libc.include.sys_stat
libc.src.errno.errno
libc.src.errno.errno
libc.src.fcntl.open
libc.src.sys.sendfile.sendfile
libc.src.unistd.close
Expand Down
4 changes: 2 additions & 2 deletions libc/test/src/sys/wait/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ add_libc_unittest(
waitpid_test.cpp
DEPENDS
libc.include.sys_wait
libc.src.errno.errno
libc.src.errno.errno
libc.src.sys.wait.waitpid
)

Expand All @@ -20,6 +20,6 @@ add_libc_unittest(
wait4_test.cpp
DEPENDS
libc.include.sys_wait
libc.src.errno.errno
libc.src.errno.errno
libc.src.sys.wait.wait4
)
Loading
Loading